16 #ifndef INCLUDED_numeric_angle_functions_hh
17 #define INCLUDED_numeric_angle_functions_hh
32 template<
typename T >
42 template<
typename T >
52 template<
typename T >
62 template<
typename T >
72 template<
typename T >
82 template<
typename T >
87 return modulo( angle,
T( 360.0 ) );
92 template<
typename T >
102 template<
typename T >
112 template<
typename T >
117 return angle - (
nearest_ssize( ( angle - base_angle ) /
T( 360.0 ) ) *
T( 360.0 ) );
124 #endif // INCLUDED_numeric_angle_functions_HH
T nearest_angle_radians(T const &angle, T const &base_angle)
Nearest periodic value of angle to a base angle in radians.
T principal_angle(T const &angle)
Principal value of angle in radians on ( -pi, pi ].
T principal_angle_radians(T const &angle)
Principal value of angle in radians on ( -pi, pi ].
NumericTraits: Numeric type traits.
T principal_angle_degrees(T const &angle)
Principal value of angle in degrees on ( -180, 180 ].
T remainder(T const &x, T const &y)
Remainder of x with respect to division by y that is of smallest magnitude.
T nonnegative_principal_angle_degrees(T const &angle)
Positive principal value of angle in degrees on [ 0, 360 )
T nearest_angle_degrees(T const &angle, T const &base_angle)
Nearest periodic value of angle to a base angle in degrees.
T modulo(T const &x, T const &y)
x(mod y) mathematical modulo returning magnitude < | y | and sign of y
SSize nearest_ssize(T const &x)
nearest_ssize( x ): Nearest SSize
T nearest_angle(T const &angle, T const &base_angle)
Nearest periodic value of angle to a base angle in radians.
T nonnegative_principal_angle(T const &angle)
Positive principal value of angle in radians on [ 0, 2*pi )
T nonnegative_principal_angle_radians(T const &angle)
Positive principal value of angle in radians on [ 0, 2*pi )