refactor: 💥 magnitudes code cleanup + mag_pi is now mag<pi>

This commit is contained in:
Mateusz Pusz
2024-09-23 12:39:22 +02:00
parent 4492d42b91
commit 3671f64153
14 changed files with 494 additions and 666 deletions

View File

@@ -42,11 +42,11 @@ using namespace mp_units;
using namespace mp_units::angular;
using namespace mp_units::angular::unit_symbols;
inline constexpr struct half_revolution final : named_unit<"hrev", mag_pi * radian> {
inline constexpr struct half_revolution final : named_unit<"hrev", mag<pi> * radian> {
} half_revolution;
inline constexpr auto hrev = half_revolution;
// constexpr auto revb6 = mag_ratio<1,3> * mag_pi * rad;
// constexpr auto revb6 = mag_ratio<1,3> * mag<pi> * rad;
TEST_CASE("value_cast should not truncate for valid inputs", "[value_cast]")
{