Trackmania ManiaScript Reference 2024.9.17.1117
A ManiaScript Reference of the new Trackmania.
Loading...
Searching...
No Matches
MathLib Namespace Reference

Standard mathematical operations, angles are in radians unless specified. More...

Functions

Integer Abs (Integer _Argument1)
 
Real Abs (Real _Argument1)
 
Real ToReal (Integer _Argument1)
 
Real DegToRad (Real _Degree)
 Converts an angle from degrees to radians.
 
Real RadToDeg (Real _Radian)
 Converts an angle from radians to degrees.
 
Real Sin (Real _Argument1)
 
Real Cos (Real _Argument1)
 
Real Tan (Real _Argument1)
 
Real Atan2 (Real _Argument1, Real _Argument2)
 
Real Exp (Real _Argument1)
 
Real Rand (Real _Argument1, Real _Argument2)
 
Real Rand (Real _Argument1, Real _Argument2, Integer _Argument3)
 
Integer Rand (Integer _Argument1, Integer _Argument2)
 
Integer Rand (Integer _Argument1, Integer _Argument2, Integer _Argument3)
 
Real NearestReal (Integer _Argument1)
 
Integer NearestInteger (Real _Argument1)
 
Integer FloorInteger (Real _Argument1)
 
Integer TruncInteger (Real _Argument1)
 
Integer CeilingInteger (Real _Argument1)
 
Real Distance (Real _Argument1, Real _Argument2)
 
Real Distance (Vec2 _Argument1, Vec2 _Argument2)
 Euclidian distance between two 2d points.
 
Real Distance (Vec3 _Argument1, Vec3 _Argument2)
 Euclidian distance between two 3d points.
 
Real Length (Vec2 _Argument1)
 Euclidian norm of the vector.
 
Real Length (Vec3 _Argument1)
 Euclidian norm of the vector.
 
Real Norm0 (Vec2 _Argument1)
 Returns maximum of the absolute value of each component.
 
Real Norm1 (Vec2 _Argument1)
 Returns the sum of the absolute value of each component.
 
Real Norm0 (Vec3 _Argument1)
 Returns maximum of the absolute value of each component.
 
Real Norm1 (Vec3 _Argument1)
 Returns the sum of the absolute value of each component.
 
Integer Norm0 (Int2 _Argument1)
 Returns maximum of the absolute value of each component.
 
Integer Norm1 (Int2 _Argument1)
 Returns the sum of the absolute value of each component.
 
Integer Norm0 (Int3 _Argument1)
 Returns maximum of the absolute value of each component.
 
Integer Norm1 (Int3 _Argument1)
 Returns the sum of the absolute value of each component.
 
Real DotProduct (Vec3 _Argument1, Vec3 _Argument2)
 
Vec3 CrossProduct (Vec3 _Argument1, Vec3 _Argument2)
 
Real DotProduct (Vec2 _Argument1, Vec2 _Argument2)
 
Integer DotProduct (Int3 _Argument1, Int3 _Argument2)
 
Int3 CrossProduct (Int3 _Argument1, Int3 _Argument2)
 
Integer DotProduct (Int2 _Argument1, Int2 _Argument2)
 
Real Angle (Vec3 _Argument1, Vec3 _Argument2)
 
Real OrientedAngle (Vec3 _Argument1, Vec3 _Argument2)
 
Real Angle (Real _Radian1, Real _Radian2)
 Returns the smallest angle from A to B.
 
Real Angle (Vec2 _Argument1, Vec2 _Argument2)
 
Real OrientedAngle (Vec2 _Argument1, Vec2 _Argument2)
 
Real PI ()
 
Real Asin (Real _Argument1)
 
Real Acos (Real _Argument1)
 
Real Pow (Real _Argument1, Real _Argument2)
 
Real Ln (Real _Argument1)
 
Real Sqrt (Real _Argument1)
 
Integer Max (Integer _A, Integer _B)
 Returns the maximum between A and B.
 
Integer Min (Integer _A, Integer _B)
 Returns the minimum between A and B.
 
Integer Clamp (Integer _X, Integer _Min, Integer _Max)
 Returns the value X clamped to the range Min..Max.
 
Real Max (Real _A, Real _B)
 Returns the maximum between A and B.
 
Real Min (Real _A, Real _B)
 Returns the minimum between A and B.
 
Real Clamp (Real _X, Real _Min, Real _Max)
 Returns the value X clamped to the range Min..Max.
 
Real Mod (Real _X, Real _Min, Real _Max)
 Returns the modulus of X in the range Min..Max.
 
Vec2 Max (Vec2 _A, Vec2 _B)
 Returns the maximum between A and B.
 
Vec2 Min (Vec2 _A, Vec2 _B)
 Returns the minimum between A and B.
 
Vec2 Clamp (Vec2 _X, Vec2 _Min, Vec2 _Max)
 Returns the value X clamped to the range Min..Max.
 
Vec3 Max (Vec3 _A, Vec3 _B)
 Returns the maximum between A and B.
 
Vec3 Min (Vec3 _A, Vec3 _B)
 Returns the minimum between A and B.
 
Vec3 Clamp (Vec3 _X, Vec3 _Min, Vec3 _Max)
 Returns the value X clamped to the range Min..Max.
 
Int2 Max (Int2 _A, Int2 _B)
 Returns the maximum between A and B.
 
Int2 Min (Int2 _A, Int2 _B)
 Returns the minimum between A and B.
 
Int2 Clamp (Int2 _X, Int2 _Min, Int2 _Max)
 Returns the value X clamped to the range Min..Max.
 
Int3 Max (Int3 _A, Int3 _B)
 Returns the maximum between A and B.
 
Int3 Min (Int3 _A, Int3 _B)
 Returns the minimum between A and B.
 
Int3 Clamp (Int3 _X, Int3 _Min, Int3 _Max)
 Returns the value X clamped to the range Min..Max.
 

Variables

const Real Pi = 3.14159
 
const Real Tau = 6.28319
 

Detailed Description

Standard mathematical operations, angles are in radians unless specified.