mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
1. Information about a unit's dimension now uses inheritance. _m is an instance of DistanceAlias, which is derived from Alias. A UnitNode now keeps a pointer to an Alias and one to a Prefix. All aliases are still defined as constexpr. This cleans up a lot of the code used namely for computing the additional outputs in Calculation. 2. Instead of being defined with a string, each unit is described by its ratio with the base SI unit (ex: _L is 0.001 instead of "0.001_m^3"). This greatly speeds up the calculations using units, as the algorithm to find the best unit used to parse the definition. Change-Id: I4d6ed6ad4cb967026a3f01a335aec270066e2b9f
13 KiB
13 KiB