3 ms·
Rust doesn’t automatically apply conversions, full stop. And with a thoughtful approach to the API, you could avoid numerical error entirely by using integral
by stouset 2y ago
Rust doesn’t automatically apply conversions, full stop.
And with a thoughtful approach to the API, you could avoid numerical error entirely by using integral types.
- amenghra 2y agoThat’s a good starting point. The temperature delta issue remains: adding and subtracting temperatures should create a different unit. Thankfully there aren’t a lot of non-linear units.
- throwawaymaths 2y agothats why i put the word "you" in there. rust will do whatever automagic conversions you specify in the impls. Perhaps i should have used the verb "make" instead of "let". if you make rust automagically convert.