Skip to content

Commit

Permalink
Einführung von pi-Konstanten auf Basis der Einheit 1
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfehrs committed Sep 14, 2024
1 parent 865e4cb commit 1f68448
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/zollstock/numbers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
namespace zollstock::inline numbers
{

template <number_c Number>
constexpr quantity<units::rad, Number> pi_1_v{ std::numbers::pi_v<Number> };

inline constexpr quantity<units::_1, float > pi_f_1{ pi_rad_v<float > };
inline constexpr quantity<units::_1, double > pi_1 { pi_rad_v<double > };
inline constexpr quantity<units::_1, long double> pi_l_1{ pi_rad_v<long double> };


template <number_c Number>
constexpr quantity<units::rad, Number> pi_rad_v{ std::numbers::pi_v<Number> };

Expand Down

0 comments on commit 1f68448

Please sign in to comment.