Math group

Classes

vec2 A 2-dimensional vector.

vec3 A 3-dimensional vector.

vec4 A 4-dimensional vector.

int2 A 2-dimensional vector for integers.

int3 A 3-dimensional vector for integers.

nat2 A 2-dimensional vector for unsigned integers.

nat3 A 3-dimensional vector for unsigned integers.

quat A quaternion.

iso3 A matrix with 3 rows and 2 columns.

mat3 A matrix with 3 rows and 3 columns.

iso4 A matrix with 4 rows and 3 columns.

mat4 A matrix with 4 rows and 4 columns.

surf The surface type used in Maniaplanet.

Global functions

int Math::Abs(int i)

float Math::Abs(float f)

float Math::Sin(float f)

float Math::Asin(float f)

float Math::Cos(float f)

float Math::Acos(float f)

float Math::Tan(float f)

float Math::Atan(float f)

float Math::Atan2(float y, float x)

float Math::Exp(float f)

float Math::Pow(float x, float y)

float Math::Sqrt(float f)

float Math::ToDeg(float rad)

float Math::ToRad(float deg)

float Math::Rand(float min, float max)

int Math::Rand(int min, int max)

float Math::Log(float f)

float Math::Log2(float f)

float Math::Log10(float f)

float Math::Log1p(float f)

float Math::Logb(float f)

float Math::Floor(float f)

float Math::Ceil(float f)

float Math::Round(float f)

float Math::InvLerp(const float&in min, const float&in max, const float&in value)

float Math::InvLerp(const int&in min, const int&in max, const int&in value)

float Math::Lerp(const float&in min, const float&in max, float x)

vec2 Math::Lerp(const vec2&in min, const vec2&in max, float x)

vec3 Math::Lerp(const vec3&in min, const vec3&in max, float x)

vec4 Math::Lerp(const vec4&in min, const vec4&in max, float x)

float Math::Distance2(const vec3&in a, const vec3&in b)

float Math::Distance(const vec3&in a, const vec3&in b)

float Math::Dot(const vec3&in a, const vec3&in b)

vec3 Math::Cross(const vec3&in a, const vec3&in b)

float Math::Angle(const vec3&in a, const vec3&in b)

int Math::Min(int x, int y)

float Math::Min(float x, float y)

int Math::Max(int x, int y)

float Math::Max(float x, float y)

int Math::Clamp(int x, int min, int max)

float Math::Clamp(float x, float min, float max)