MeasurementZone
public struct MeasurementZone
A MeasurementZone is a model type that bounds values between a upper and lower bounds.
MeasurementZone may be a Heart Rate Zone, FTP Zone, or used for other measurements
that you wish to bound between an upper and lower value
-
Zone Range
Declaration
Swift
private(set) public var range: ClosedRange<UInt8> -
Name of the Zone
Declaration
Swift
private(set) public var name: String -
Color Repesentation of the Zone
Declaration
Swift
private(set) public var color: ColorType -
Undocumented
Declaration
Swift
public init(lower: UInt8, upper: UInt8, name: String, color: ColorType) -
Check if Value is contained in the Zone
Declaration
Swift
public func contains(value: UInt8) -> BoolParameters
valueMeasurement Value
Return Value
Results of the check
-
Encodes this value into the given encoder.
If the value fails to encode anything,
encoderwill encode an empty keyed container in its place.This function throws an error if any values are invalid for the given encoder’s format.
Declaration
Swift
public func encode(to encoder: Encoder) throwsParameters
encoderThe encoder to write data to.