Commit Graph

7 Commits

Author SHA1 Message Date
bofdahof
2e0df80e84 Base: Units: refactor
Refactor Units making it constexpr, immutable, with repetition reduced.
Separate data from code.

Constexpr constructed units allow constructing predefined Quantities
from predefined unit types.
2025-06-03 09:31:38 +02:00
Ladislav Michl
a0917bcc7c Base: Units: introduce unit one
Dimensionless quantities have all exponents equal to zero.
Such quantities are simply numbers. The associated unit is
the unit one, symbol 1, although this is rarely explicitly
written.

See chapter 2.3.3 Dimensions of quantities, The International
System of Units, 9th edition.
2025-06-03 09:31:38 +02:00
Ladislav Michl
379d7ea9d5 Base: Units: return std::string 2024-12-23 17:48:42 +01:00
Chris Hennes
c622221c70 Test: Support system GTest, and give warning if no submodule (#13662) 2024-06-03 10:40:35 -05:00
pre-commit-ci[bot]
e92ed45df9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
Chris Hennes
9e9e0f7593 Formatting: Apply pre-commit to tests/src 2023-04-06 08:07:53 +02:00
berniev
d50d783e26 Multiple files under test in one test file
Put Unit into its own test file and rename Units.cpp to Quantity.cpp
2023-03-02 22:12:21 +01:00