1
2
3
4
5
6 #include <cmajor/rt/Math.hpp>
7 #include <cmath>
8 #define _USE_MATH_DEFINES
9 #include <math.h>
10 #include <limits>
11
12 double RtPow(double x, int32_t exponent)
13 {
14 return std::pow(x, exponent);
15 }
16
17 double Pow(double x, double y)
18 {
19 return std::pow(x, y);
20 }
21
22 double RtSqrt(double x)
23 {
24 return std::sqrt(x);
25 }
26
27 double RtPi()
28 {
29 return M_PI;
30 }
31
32 double RtCos(double angleRad)
33 {
34 return std::cos(angleRad);
35 }
36
37 double RtSin(double angleRad)
38 {
39 return std::sin(angleRad);
40 }
41
42 double RtArcCos(double x)
43 {
44 return std::acos(x);
45 }
46
47 double RtArcSin(double x)
48 {
49 return std::asin(x);
50 }
51
52 double RtAtan2(double y, double x)
53 {
54 return std::atan2(y, x);
55 }
56
57 double RtEpsilon()
58 {
59 return std::numeric_limits<double>::epsilon();
60 }