21[[nodiscard]]
constexpr auto deg2rad(
const T& deg)
23 return deg * std::numbers::pi_v<double> / 180.0;
29template<
typename Scalar>
30[[nodiscard]]
inline Eigen::Vector3<Scalar> deg2rad(
const Eigen::Vector3<Scalar>& deg)
32 return deg * std::numbers::pi_v<Scalar> / 180.0;
39[[nodiscard]]
constexpr auto rad2deg(
const T& rad)
41 return rad * 180.0 / std::numbers::pi_v<double>;
47template<
typename Scalar>
48[[nodiscard]]
inline Eigen::Vector3<Scalar> rad2deg(
const Eigen::Vector3<Scalar>& rad)
50 return rad * 180.0 / std::numbers::pi_v<Scalar>;
57[[nodiscard]]
constexpr auto semicircles2rad(
const T& semicircles)
59 return semicircles * std::numbers::pi_v<double>;
66[[nodiscard]]
constexpr auto rad2semicircles(
const T& rad)
68 return rad / std::numbers::pi_v<double>;
72constexpr long double operator"" _deg(
long double deg)
78constexpr long double operator"" _mas(
long double mas)
80 return mas * std::numbers::pi_v<long double> / 648000000.0L;
84constexpr long double operator"" _mas(
unsigned long long mas)
86 return static_cast<long double>(mas) * std::numbers::pi_v<long double> / 648000000.0L;
90constexpr long double operator"" _ppb(
long double ppb)
96constexpr long double operator"" _ppb(
unsigned long long ppb)
98 return static_cast<long double>(ppb) * 1e-9L;