SolidUtils
Geometry.hpp
Go to the documentation of this file.
1 
29 #ifndef SOLIDUTILS_INCLUDE_GEOMETRY_HPP
30 #define SOLIDUTILS_INCLUDE_GEOMETRY_HPP
31 
32 namespace sl
33 {
34 
35 class Geometry
36 {
37  public:
38  static constexpr double const PI = 3.141592653589793;
39 
47  static constexpr double deg2rad(
48  double const deg)
49  {
50  return (deg * PI) / 180.0;
51  }
52 
60  static constexpr double rad2deg(
61  double const rad)
62  {
63  return rad * 180.0 / PI;
64  }
65 
66 
67 };
68 
69 }
70 
71 #endif
Definition: Alloc.hpp:40
static constexpr double deg2rad(double const deg)
Convert degrees to radians.
Definition: Geometry.hpp:47
static constexpr double rad2deg(double const rad)
Convert radians to degrees.
Definition: Geometry.hpp:60
Definition: Geometry.hpp:35