HiveMind
|
Namespace that provides basic mathematical operations. Optized for the platform. More...
Functions | |
float | cos (float x) |
calculate the cosine More... | |
float | sin (float x) |
calculate the sine More... | |
float | tan (float x) |
calculate the tangent More... | |
float | acos (float x) |
calculate the arc cosine More... | |
float | asin (float x) |
calculate the arc sine More... | |
float | atan (float x) |
calculate the arc tangent More... | |
float | atan2 (float y, float x) |
calculate the arc of x/y More... | |
float | pow (float base, float exponent) |
Calculates the base raised to the power of the exponent. More... | |
float | sqrt (float x) |
Calculates the square root. More... | |
float | cbrt (float x) |
Calculates the cube root. More... | |
float | exp (float x) |
Calculates the exponent. More... | |
float | ln (float x) |
Calculates the natural logarithm. More... | |
float | log10 (float x) |
Calculates the logarithm base 10. More... | |
float | log2 (float x) |
Calculates the logarithm base 2. More... | |
float | ceil (float x) |
Round x upward. More... | |
float | floor (float x) |
Floor x downward. More... | |
float | fmod (float numer, float denom) |
Calculates the remainder of numer/denom. More... | |
float | round (float x) |
Round x. More... | |
float | fdim (float x, float y) |
Returns the positive difference between x and y. More... | |
float | fmax (float x, float y) |
Return the larger of it's arguments, either x or y. More... | |
float | fmin (float x, float y) |
Return the minimum of it's arguments, either x or y. More... | |
float | fabs (float x) |
Return the absolute value. More... | |
int | abs (int x) |
Return the absolute value. More... | |
Variables | |
const float | pi = M_PI |
const float | e = M_E |
Namespace that provides basic mathematical operations. Optized for the platform.
int Math::abs | ( | int | x | ) |
Return the absolute value.
x | value whose absolute value is returned |
float Math::acos | ( | float | x | ) |
calculate the arc cosine
x | value to compute, interval of [-1, +1]. An error occur if out of the interval |
float Math::asin | ( | float | x | ) |
calculate the arc sine
x | value to compute, interval of [-1, +1]. An error occur if out of the interval |
float Math::atan | ( | float | x | ) |
calculate the arc tangent
x | value to compute. |
float Math::atan2 | ( | float | y, |
float | x | ||
) |
calculate the arc of x/y
y | value representing the y coordinate |
x | value representing the x coordinate |
float Math::cbrt | ( | float | x | ) |
Calculates the cube root.
x | the value to cube root. If x is negative, an error occure |
float Math::ceil | ( | float | x | ) |
Round x upward.
x | the value to round up |
float Math::cos | ( | float | x | ) |
calculate the cosine
x | value in radian |
float Math::exp | ( | float | x | ) |
Calculates the exponent.
x | the value of the exponent |
float Math::fabs | ( | float | x | ) |
Return the absolute value.
x | value whose absolute value is returned |
float Math::fdim | ( | float | x, |
float | y | ||
) |
Returns the positive difference between x and y.
x | the value to be subtracted |
y | the value to subtract |
float Math::floor | ( | float | x | ) |
Floor x downward.
x | the value to floor down |
float Math::fmax | ( | float | x, |
float | y | ||
) |
Return the larger of it's arguments, either x or y.
x | one of the value to select the maximum |
y | one of the value to select the maximum |
float Math::fmin | ( | float | x, |
float | y | ||
) |
Return the minimum of it's arguments, either x or y.
x | one of the value to select the minimum |
y | one of the value to select the minimum |
float Math::fmod | ( | float | numer, |
float | denom | ||
) |
Calculates the remainder of numer/denom.
numer | the quotient numerator |
denom | the quotient denominator of 0, an error occurs |
float Math::ln | ( | float | x | ) |
Calculates the natural logarithm.
x | the value whose logarithm is calculated |
float Math::log10 | ( | float | x | ) |
Calculates the logarithm base 10.
x | the value whose logarithm is calculated |
float Math::log2 | ( | float | x | ) |
Calculates the logarithm base 2.
x | the value whose logarithm is calculated |
float Math::pow | ( | float | base, |
float | exponent | ||
) |
Calculates the base raised to the power of the exponent.
base | the base value |
exponent | the exponent value |
float Math::round | ( | float | x | ) |
Round x.
x | the value to round |
float Math::sin | ( | float | x | ) |
calculate the sine
x | value in radian |
float Math::sqrt | ( | float | x | ) |
Calculates the square root.
x | the value to square root. If x is negative, an error occure |
float Math::tan | ( | float | x | ) |
calculate the tangent
x | value in radian |
const float Math::e = M_E |
const float Math::pi = M_PI |