nholthaus / units

a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
http://nholthaus.github.io/units/
MIT License
947 stars 135 forks source link

Simplify numerical scales #199

Closed JohelEGP closed 5 years ago

JohelEGP commented 5 years ago

With this, the fact that the unit values are stored linearized has effectively become an implementation detail, I think.

I think this is desirable as the current scales can be abused because they're publicly bases of unit, their constructors were overly accepting, and the non-linear scale concept is underspecified.

nholthaus commented 5 years ago

great change. I had in my head at one point that the scales could support really whacky things (like richter scale or other offset scales similar to how temperature is handled), but it was very poorly named and pointlessly complex in the end, in addition to never being exercised.