1 #ifndef COMMON_ALNUMBERS_H
2 #define COMMON_ALNUMBERS_H
6 namespace al::numbers
{
10 using as_fp
= std::enable_if_t
<std::is_floating_point
<T
>::value
, T
>;
14 inline constexpr auto pi_v
= detail_::as_fp
<T
>(3.141592653589793238462643383279502884L);
17 inline constexpr auto inv_pi_v
= detail_::as_fp
<T
>(0.318309886183790671537767526745028724L);
20 inline constexpr auto sqrt2_v
= detail_::as_fp
<T
>(1.414213562373095048801688724209698079L);
23 inline constexpr auto sqrt3_v
= detail_::as_fp
<T
>(1.732050807568877293527446341505872367L);
25 inline constexpr auto pi
= pi_v
<double>;
26 inline constexpr auto inv_pi
= inv_pi_v
<double>;
27 inline constexpr auto sqrt2
= sqrt2_v
<double>;
28 inline constexpr auto sqrt3
= sqrt3_v
<double>;
30 } // namespace al::numbers
32 #endif /* COMMON_ALNUMBERS_H */