Re:Atlas, a hopefully better engineering IDE
by rurban on Tuesday May 11, 2021 @01:14AM
(#27114457)
When I implemented unit support into my engine I used the units cmdline tool. Was by far the best and easiest to use. https://www.gnu.org/software/units/manual/html_node/Command-...
[ Parent
| on HN ]
Unit conversion is not the issue. It's strong typing the values themselves so that you don't actually plug in a value in feet that was thought to be in meters. This means each numeric value must have it's own type (or equivalent strong compiler or runtime backed constraints).
So instead of float, we have (eg) float_meters, float_feet and so on.