1 #ifndef COMMON_ALNUMBERS_H
2 #define COMMON_ALNUMBERS_H
12 using as_fp = std::enable_if_t<std::is_floating_point<T>::value, T>;
16 static constexpr auto pi_v = detail_::as_fp<T>(3.141592653589793238462643383279502884L);
19 static constexpr auto inv_pi_v = detail_::as_fp<T>(0.318309886183790671537767526745028724L);
22 static constexpr auto sqrt2_v = detail_::as_fp<T>(1.414213562373095048801688724209698079L);
25 static constexpr auto sqrt3_v = detail_::as_fp<T>(1.732050807568877293527446341505872367L);
27 static constexpr auto pi = pi_v<double>;
28 static constexpr auto inv_pi = inv_pi_v<double>;
29 static constexpr auto sqrt2 = sqrt2_v<double>;
30 static constexpr auto sqrt3 = sqrt3_v<double>;
32 } // namespace numbers
36 #endif /* COMMON_ALNUMBERS_H */