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.
This commit is contained in:
Ladislav Michl
2025-04-10 19:15:02 +02:00
parent 1c955c9347
commit f8d2789a43
10 changed files with 21 additions and 22 deletions

View File

@@ -121,7 +121,7 @@ TEST(Unit, TestPowNoDim)
{
Base::Unit unit {};
EXPECT_EQ(unit.pow(2), Base::Unit {0});
EXPECT_EQ(unit.isEmpty(), true);
EXPECT_EQ(unit == Base::Unit::One, true);
}
TEST(Unit, TestPowEQ1)