Double

extension Double: Resolutionable, FixedWidthIntegerResolutionable
extension Double: FitFieldCodeable
  • Apply Resolution with Direction

    Declaration

    Swift

    public func resolution(_ direction: ResolutionDirection, resolution: Resolution) -> Double

    Parameters

    direction

    Type of Resolution Direction

    resolution

    Resolution

    Return Value

    Number with Resolution applied

  • Apply Resolution With Direction

    Declaration

    Swift

    public func resolution<T>(type: T.Type, _ direction: ResolutionDirection, resolution: Resolution) -> T where T : FixedWidthInteger

    Parameters

    type

    Type to resolve to

    direction

    Resolution Direction

    resolution

    Resolution

    Return Value

    Number with Resolution Applied

  • Decode FIT Field

    Declaration

    Swift

    public static func decode<T>(type: T.Type, data: Data, base: BaseTypeData, arch: Endian) -> T?

    Parameters

    type

    Type of Field

    data

    Data to Decode

    base

    BaseTypeData

    arch

    Endian

    Return Value

    Decoded Value

  • Encode Into Data

    Declaration

    Swift

    public func encode(base: BaseTypeData) -> Data?

    Parameters

    base

    BaseTypeData