refactor: pi mag_constant refactored to be one-liner
This commit is contained in:
1 parent
fcbd172135
commit
47344b13bd
2 files changed
+4
-6
No files matched your search
@@ -184,10 +184,9 @@ For some units, a magnitude might also be irrational. The best example here is a
|
||||
is defined using a floating-point magnitude having a factor of the number π (Pi):
|
||||
|
||||
```cpp
|
||||
struct pi : mag_constant {
|
||||
inline constexpr struct pi : mag_constant {
|
||||
static constexpr auto value = std::numbers::pi_v<long double>;
|
||||
};
|
||||
inline constexpr pi pi;
|
||||
} pi;
|
||||
```
|
||||
|
||||
```cpp
|
||||
|
||||
Reference in new issue
Block a user