user1162328
user1162328

Reputation:

Swift NSmeasurement UnitMass.stones

Playing around with swift measurements, I have come across a questionable value conversion. As illustrated below kg to lb is correct, but the same kilogram to stone conversion is not correct, unless I'm not understanding the conversion correctly.

let pounds = Measurement(value: 75, unit: UnitMass.kilograms).converted(to: UnitMass.pounds) // 165.34... lb (correct)
let stones = Measurement(value: 75, unit: UnitMass.kilograms).converted(to: UnitMass.stones) // 476.272... st (should be 11.81)

Upvotes: 2

Views: 884

Answers (1)

cooperstandard
cooperstandard

Reputation: 91

In the UnitMass class reference it lists a stone = 0.157473kg, it is not a frequently used property so it probably has not been noticed as of yet.

Upvotes: 2

Related Questions