feat: 𝜋 added as an alias for pi

This commit is contained in:
Mateusz Pusz
2024-10-14 22:49:58 +02:00
parent f5649205cf
commit 6591a65d06
10 changed files with 55 additions and 53 deletions

View File

@@ -45,7 +45,7 @@ inline constexpr struct speed_of_light_in_vacuum final :
} // namespace si2019
inline constexpr struct magnetic_constant final :
named_unit<{u8"μ₀", "u_0"}, mag<4> * mag<pi> * mag_power<10, -7> * henry / metre> {} magnetic_constant;
named_unit<{u8"μ₀", "u_0"}, mag<4> * mag<𝜋> * mag_power<10, -7> * henry / metre> {} magnetic_constant;
} // namespace mp_units::si
```

View File

@@ -185,10 +185,11 @@ is defined using a floating-point magnitude having a factor of the number π (Pi
```cpp
inline constexpr struct pi final : mag_constant<symbol_text{u8"𝜋", "pi"}, std::numbers::pi_v<long double>> {} pi;
inline constexpr auto 𝜋 = pi;
```
```cpp
inline constexpr struct degree final : named_unit<{u8"°", "deg"}, mag<pi> / mag<180> * si::radian> {} degree;
inline constexpr struct degree final : named_unit<{u8"°", "deg"}, mag<𝜋> / mag<180> * si::radian> {} degree;
```