Math functions and structures.
Math functions and structures.
Pi as a float.
Pi multiplied by 2 as a float.
Pi as a double.
Pi multiplied by 2 as a double.
Positive infinity as a float.
Negative infinity as a float.
Positive infinity as a double.
Negative infinity as a double.
class Math::Randomizer
A randomizer that can be seeded with a specific seed. The default constructor uses the seed 5489.
int Math::Abs(int i)
int float Math::Abs(float f)
float float Math::Sin(float f)
float float Math::Asin(float f)
float float Math::Cos(float f)
float float Math::Acos(float f)
float float Math::Tan(float f)
float float Math::Atan(float f)
float float Math::Atan2(float y, float x)
float float Math::Exp(float f)
float float Math::Pow(float x, float y)
float float Math::Sqrt(float f)
float float Math::ToDeg(float rad)
float float Math::ToRad(float deg)
float float Math::Rand(float min, float max)
Generate a random floating point value between min (inclusive) and max (exclusive).
float int Math::Rand(int min, int max)
Generate a random integer between min (inclusive) and max (exclusive).
int float Math::Log(float f)
float float Math::Log2(float f)
float float Math::Log10(float f)
float float Math::Log1p(float f)
float float Math::Logb(float f)
float float Math::Floor(float f)
float float Math::Ceil(float f)
float float Math::Round(float f)
float float Math::Round(float f, int decimals)
float float Math::Distance2(const vec2&in a, const vec2&in b)
float float Math::Distance2(const vec3&in a, const vec3&in b)
float float Math::Distance(const vec2&in a, const vec2&in b)
float float Math::Distance(const vec3&in a, const vec3&in b)
float float Math::Dot(const vec2&in a, const vec2&in b)
float float Math::Dot(const vec3&in a, const vec3&in b)
float float Math::Angle(const vec2&in a, const vec2&in b)
float float Math::Angle(const vec3&in a, const vec3&in b)
float int Math::Clamp(int x, int min, int max)
Clamps the value x between min and max. Throws an exception when min is higher than max.
int float Math::Clamp(float x, float min, float max)
Clamps the value x between min and max. Throws an exception when min is higher than max.
float bool Math::IsNaN(float)
bool bool Math::IsInf(float)
bool uint16 Math::SwapBytes(uint16)
uint16 uint Math::SwapBytes(uint)
uint uint64 Math::SwapBytes(uint64)
uint64