I'm trying to use (NS)Measurement
to convert any higher unit into kilobytes
.
let mes = Measurement(value: 3, unit: UnitInformationStorage.megabytes)
let kilobytes = mes.converted(to: .kilobytes).value
I expect kilobytes to be 3072
, but instead I get 3000
.
I get that in computing we often do rounding and for many people 1000 kilobytes = 1MB when in reality it should be 1024 kilobytes = 1MB. Is there any way to change this behavior?