Calculation

public struct Calculation : Codable
extension Calculation: Hashable
extension Calculation: Equatable
extension Calculation: Comparable

A value type that represents the calculations performs by a DiveCalculator

Since

1.0
  • Double representing the calculated value

    Declaration

    Swift

    private(set) public var value: Double { get }
  • The Calculation.CalculationType of calculation.

    Declaration

    Swift

    private(set) public var calculationType: CalculationType { get }
  • The DiveKit.WaterType use for the calculation.

    Declaration

    Swift

    private(set) public var waterType: DiveKit.WaterType { get }
  • The DiveKit.MeasurementUnit use for the calculation.

    Declaration

    Swift

    private(set) public var measurementUnit: DiveKit.MeasurementUnit { get }
  • Returns a double rounded to the specified number of decimal places

    Declaration

    Swift

    public func round(to decimalPlaces: Int) -> Double
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public static func == (lhs: `Self`, rhs: `Self`) -> Bool
  • Declaration

    Swift

    public static func < (lhs: Calculation, rhs: Calculation) -> Bool
  • The type of calculation performed.

    See more

    Declaration

    Swift

    public enum CalculationType : Int, Codable