BoosterSeat  0.1
A C++ library that includes common utilities that are used in other projects.
math.hpp
Go to the documentation of this file.
1 
9 #ifndef BOOSTER_SEAT_MATH_HPP_
10 #define BOOSTER_SEAT_MATH_HPP_
11 
12 namespace bst::math {
13 
15 inline constexpr double PI = 3.14159265358979323846;
16 
18 inline constexpr double TWO_PI = 2.0 * PI;
19 
21 inline constexpr double D2R = PI / 180.0;
22 
24 inline constexpr double R2D = 180.0 / PI;
25 
26 } // namespace bst::math
27 
28 namespace bst {
30 inline constexpr double PI = 3.14159265358979323846;
31 
33 inline constexpr double HALF_PI = PI / 2.0;
34 
36 inline constexpr double THREE_PI_HALVES = 3.0 * HALF_PI;
37 
39 inline constexpr double TWO_PI = 2.0 * PI;
40 
42 inline constexpr double D2R = PI / 180.0;
43 
45 inline constexpr double R2D = 180.0 / PI;
46 } // namespace bst
47 
48 #endif /* BOOSTER_SEAT_MATH_HPP_ */
Definition: math.hpp:12
constexpr double D2R
Factor to convert degrees to radians.
Definition: math.hpp:21
constexpr double R2D
Factor to convert radians to degrees.
Definition: math.hpp:24
constexpr double PI
The mathematical constant pi.
Definition: math.hpp:15
constexpr double TWO_PI
Two times pi.
Definition: math.hpp:18
Definition: filesystem.cpp:34
constexpr double D2R
Factor to convert degrees to radians.
Definition: math.hpp:42
constexpr double R2D
Factor to convert radians to degrees.
Definition: math.hpp:45
constexpr double HALF_PI
Half of pi.
Definition: math.hpp:33
constexpr double THREE_PI_HALVES
Three halves of pi.
Definition: math.hpp:36
constexpr double PI
The mathematical constant pi.
Definition: math.hpp:30
constexpr double TWO_PI
Two times pi.
Definition: math.hpp:39