ChaiLove API
0.28.0
|
Provides system-independent mathematical functions. More...
Public Member Functions | |
float | random (float min, float max) |
Get uniformly distributed pseudo-random number, between the given numbers. More... | |
math & | setRandomSeed (int min, int max) |
Sets the random seed to a random seed between the given min and max values. More... | |
math & | setRandomSeed (int seed) |
Sets the seed of the random number generator. More... | |
int | getRandomSeed () |
Gets the seed of the random number generator. More... | |
float | rad (float degrees) |
Converts from degrees to radians. More... | |
float | degrees (float rad) |
Converts from radians to degrees. More... | |
Data Fields | |
const float | e = 2.718281828459045f |
Mathematic constant: e. More... | |
const float | pi = 3.14159265358979323846f |
Mathematics constant: Pi. More... | |
Provides system-independent mathematical functions.
float love::math::degrees | ( | float | rad | ) |
Converts from radians to degrees.
int love::math::getRandomSeed | ( | ) |
Gets the seed of the random number generator.
float love::math::rad | ( | float | degrees | ) |
Converts from degrees to radians.
float love::math::random | ( | float | min, |
float | max | ||
) |
math& love::math::setRandomSeed | ( | int | min, |
int | max | ||
) |
Sets the random seed to a random seed between the given min and max values.
min | The lower 32 bits of the seed value. |
max | The higher 32 bits of the seed value. |
math& love::math::setRandomSeed | ( | int | seed | ) |
Sets the seed of the random number generator.
seed | The integer number with which you want to seed the randomization. |
const float love::math::e = 2.718281828459045f |
Mathematic constant: e.
const float love::math::pi = 3.14159265358979323846f |
Mathematics constant: Pi.