one icon indicating copy to clipboard operation
one copied to clipboard

Restrict usage of offset quantities

Open propensive opened this issue 2 years ago • 1 comments

There's currently nothing to stop you adding two Celsius quantities together, even though it probably doesn't make sense. The reason is that a figure quoted "in Celsius", without more context, could mean two different things: either an absolute temperature, or as a difference between two absolute temperatures. The latter should rightly be quoted in Kelvin, and never as an offset quantity. (The same applies to Fahrenheit.)

propensive avatar Jun 12 '23 11:06 propensive

For clarity, such numbers should not be Quantitys at all. They should have a different type, which we can call Measurement. Each Measurement should correspond to a set of units (as with Quantity) but needs an artificial origin. In affine-space terminology they are points whereas Quantitys are vectors.

propensive avatar Apr 23 '25 12:04 propensive