HiveMind
Math.h
Go to the documentation of this file.
1 #ifndef __MATH_H_
2 #define __MATH_H_
3 
6 namespace Math {
7 
8  extern const float pi;
9 
10  extern const float e;
11 
15  float cos(float x);
16 
20  float sin(float x);
21 
25  float tan(float x);
26 
30  float acos(float x);
31 
35  float asin(float x);
36 
40  float atan(float x);
41 
46  float atan2(float y, float x);
47 
52  float pow(float base, float exponent);
53 
57  float sqrt(float x);
58 
62  float cbrt(float x);
63 
67  float exp(float x);
68 
72  float ln(float x);
73 
77  float log10(float x);
78 
82  float log2(float x);
83 
87  float ceil(float x);
88 
92  float floor(float x);
93 
98  float fmod(float numer, float denom);
99 
103  float round(float x);
104 
109  float fdim(float x, float y);
110 
115  float fmax(float x, float y);
116 
121  float fmin(float x, float y);
122 
126  float fabs(float x);
127 
131  int abs(int x);
132 
133 } // namespace Math
134 
135 #endif // __MATH_H_
Math::log10
float log10(float x)
Calculates the logarithm base 10.
Definition: Math.cpp:32
Math::ln
float ln(float x)
Calculates the natural logarithm.
Definition: Math.cpp:30
Math::fmin
float fmin(float x, float y)
Return the minimum of it's arguments, either x or y.
Definition: Math.cpp:48
Math::fabs
float fabs(float x)
Return the absolute value.
Definition: Math.cpp:50
Math::floor
float floor(float x)
Floor x downward.
Definition: Math.cpp:38
Math::ceil
float ceil(float x)
Round x upward.
Definition: Math.cpp:36
Math::tan
float tan(float x)
calculate the tangent
Definition: Math.cpp:12
Math::round
float round(float x)
Round x.
Definition: Math.cpp:42
Math::asin
float asin(float x)
calculate the arc sine
Definition: Math.cpp:16
Math::cos
float cos(float x)
calculate the cosine
Definition: Math.cpp:8
Math::abs
int abs(int x)
Return the absolute value.
Definition: Math.cpp:52
Math::fmax
float fmax(float x, float y)
Return the larger of it's arguments, either x or y.
Definition: Math.cpp:46
Math::acos
float acos(float x)
calculate the arc cosine
Definition: Math.cpp:14
Math::fdim
float fdim(float x, float y)
Returns the positive difference between x and y.
Definition: Math.cpp:44
Math::atan2
float atan2(float y, float x)
calculate the arc of x/y
Definition: Math.cpp:20
Math::log2
float log2(float x)
Calculates the logarithm base 2.
Definition: Math.cpp:34
Math::e
const float e
Definition: Math.cpp:6
Math::atan
float atan(float x)
calculate the arc tangent
Definition: Math.cpp:18
Math::pow
float pow(float base, float exponent)
Calculates the base raised to the power of the exponent.
Definition: Math.cpp:22
Math::cbrt
float cbrt(float x)
Calculates the cube root.
Definition: Math.cpp:26
Math::pi
const float pi
Definition: Math.cpp:4
Math
Namespace that provides basic mathematical operations. Optized for the platform.
Definition: Math.h:6
Math::fmod
float fmod(float numer, float denom)
Calculates the remainder of numer/denom.
Definition: Math.cpp:40
Math::sin
float sin(float x)
calculate the sine
Definition: Math.cpp:10
Math::sqrt
float sqrt(float x)
Calculates the square root.
Definition: Math.cpp:24
Math::exp
float exp(float x)
Calculates the exponent.
Definition: Math.cpp:28