17 #ifndef OPENKALMAN_VALUE_CLASSES_FIXED_CONSTANTS_HPP 18 #define OPENKALMAN_VALUE_CLASSES_FIXED_CONSTANTS_HPP 28 #if __cpp_nontype_template_args >= 201911L 29 template<values::number T>
30 using fixed_pi = values::Fixed<T, numbers::pi_v<T>>;
35 static_assert(values::number<T>);
37 static constexpr value_type value {numbers::pi_v<value_type>};
39 constexpr
operator value_type()
const {
return value; }
40 constexpr value_type operator()()
const {
return value; }
48 #if __cpp_nontype_template_args >= 201911L 49 template<values::number T>
55 static_assert(values::number<T>);
57 static constexpr value_type
value {-numbers::pi_v<value_type>};
59 constexpr
operator value_type()
const {
return value; }
60 constexpr value_type operator()()
const {
return value; }
68 #if __cpp_nontype_template_args >= 201911L 69 template<values::number T>
75 static_assert(values::number<T>);
77 static constexpr value_type
value {2 * numbers::pi_v<value_type>};
79 constexpr
operator value_type()
const {
return value; }
80 constexpr value_type operator()()
const {
return value; }
88 #if __cpp_nontype_template_args >= 201911L 89 template<values::number T>
95 static_assert(values::number<T>);
97 static constexpr value_type
value {
static_cast<value_type
>(0.5) * numbers::pi_v<value_type>};
99 constexpr
operator value_type()
const {
return value; }
100 constexpr value_type operator()()
const {
return value; }
108 #if __cpp_nontype_template_args >= 201911L 109 template<values::number T>
115 static_assert(values::number<T>);
116 using value_type = T;
117 static constexpr value_type
value {
static_cast<value_type
>(-0.5) * numbers::pi_v<value_type>};
119 constexpr
operator value_type()
const {
return value; }
120 constexpr value_type operator()()
const {
return value; }
128 #endif //OPENKALMAN_VALUE_CLASSES_FIXED_CONSTANTS_HPP A fixed version of pi.
Definition: fixed-constants.hpp:33
A fixed version of 2*pi.
Definition: fixed-constants.hpp:73
A fixed version of -pi.
Definition: fixed-constants.hpp:53
constexpr bool value
T is numerical value or is reducible to a numerical value.
Definition: value.hpp:31
A fixed version of pi/2.
Definition: fixed-constants.hpp:93
A fixed version of -pi/2.
Definition: fixed-constants.hpp:113
Definition for values::abs.
Definition: constant_coefficient.hpp:25
Definition for values::number.