#include <Math.h>
Class Math
Inherits from Object
Implements miscelaneous mathematical functions.
Definition at line 326 of file Math.h.
# abs()
Compute the absolute value of number.
- Parameters
-
number | Input number to compute the absolute value of |
- Returns
- Absolute value of the provided number
# aSin()
Compute the arc sin of the provided sin.
- Parameters
-
- Returns
- Arcsin of the provided sin value
Definition at line 140 of file Math.c.
# fixed_extInfinity()
Retrieve the maximum number for the fixed_ext_t data type.
- Returns
- Maximum positive value for the fixed_ext_t data type
Definition at line 133 of file Math.c.
# fixedInfinity()
static fixed_t Math::fixedInfinity |
( |
| ) |
|
|
static |
Retrieve the maximum number for the fixed_t data type.
- Returns
- Maximum positive value for the fixed_t data type
Definition at line 126 of file Math.c.
# floor()
static float Math::floor |
( |
float | number | ) |
|
|
inlinestatic |
Round down the provided number.
- Parameters
-
number | Input number to round down |
- Returns
- Integral part of the provided number
Definition at line 446 of file Math.h.
# getAngle()
Compute the angle between (0, 0) and (x, y).
- Parameters
-
x | X coordinate |
y | Y coordinate |
- Returns
- Angle in degrees (0-512)
Definition at line 165 of file Math.c.
# getDigitsCount()
Compute the number of digits that the provided number has.
- Parameters
-
number | Number to compute the digits of |
- Returns
- Number of digits of the provided number
Definition at line 542 of file Math.h.
# haveEqualSign()
Check if the provided numbers have equal sign.
- Parameters
-
a | First number |
b | Second number |
- Returns
- True if the provided numbers have equal sign; false otherwise
Definition at line 535 of file Math.h.
# intInfinity()
static int32 Math::intInfinity |
( |
| ) |
|
|
static |
Retrieve the maximum number for the int32 data type.
- Returns
- Maximum positive value for the int32 data type
Definition at line 119 of file Math.c.
# max()
Return the maximum number between two numbers.
- Parameters
-
a | First number |
b | Second number |
- Returns
- Maximum number between those provided
Definition at line 460 of file Math.h.
# min()
Return the minimum number between two numbers.
- Parameters
-
a | First number |
b | Second number |
- Returns
- Minimum number between those provided
Definition at line 453 of file Math.h.
# power()
Compute the power for the provided base.
- Parameters
-
- Returns
- Base elevated to the provided power
Definition at line 268 of file Math.c.
# powerFast()
Compute the power for the provided base.
- Parameters
-
- Returns
- Base elevated to the provided power
Definition at line 275 of file Math.c.
# random()
Compute a pseudo random number from the seed in the provided range.
- Parameters
-
seed | Random seed |
range | Range for the generated pseudo random number |
- Returns
- The square root of the provided number
Definition at line 523 of file Math.h.
# randomSeed()
static uint32 Math::randomSeed |
( |
| ) |
|
|
inlinestatic |
# resetRandomSeed()
static void Math::resetRandomSeed |
( |
| ) |
|
|
static |
Reset the internal random seed.
Definition at line 112 of file Math.c.
# squareRoot()
static float Math::squareRoot |
( |
float | radicand | ) |
|
|
inlinestatic |
Compute the square root of the provided number (alrogithm takem from the DOOM's engine).
- Parameters
-
radicand | Number to compute the square root of |
- Returns
- The square root of the provided number
Definition at line 467 of file Math.h.
# squareRootFixed()
Compute the square root of the provided number (alrogithm takem from the DOOM's engine).
- Parameters
-
radicand | Number to compute the square root of |
- Returns
- The square root of the provided number
Definition at line 485 of file Math.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Misc/Math/Math.h
- VUEngine-Core/source/Misc/Math/Math.c