VISR  0.11.1
Versatile Interactive Scene Renderer
degree_radian_conversion.hpp
Go to the documentation of this file.
1 /* Copyright Institute of Sound and Vibration Research - All rights reserved */
2 
10 #ifndef VISR_LIBEFL_DEGREE_RADIAN_CONVERSION_HPP_INCLUDED
11 #define VISR_LIBEFL_DEGREE_RADIAN_CONVERSION_HPP_INCLUDED
12 
13 #include <boost/math/constants/constants.hpp>
14 
15 #include <cmath>
16 
17 namespace visr
18 {
19 namespace efl
20 {
21 
22 template< typename T >
23 T degree2radian( T deg )
24 {
25  return boost::math::constants::degree<T>( ) * deg;
26 }
27 
28 template< typename T >
29 T radian2degree( T rad )
30 {
31  return boost::math::constants::radian<T>( ) * rad;
32 }
33 
34 } // namespace efl
35 } // namespace visr
36 
37 #endif // #ifndef VISR_LIBEFL_DEGREE_RADIAN_CONVERSION_HPP_INCLUDED
Definition: options.cpp:10
T radian2degree(T rad)
Definition: degree_radian_conversion.hpp:29
T degree2radian(T deg)
Definition: degree_radian_conversion.hpp:23