-
Notifications
You must be signed in to change notification settings - Fork 0
Docs
Extends the math library
Type: number
Value: 2.718281828459045
Args: (Num1: number
Num2: number
)
Returns: function
(T: number
) -> number
Creates an interpolator between 2 numbers
Args: (n: number
min: number
max: number
)
Returns: number
Returns a clamped number between min and max, min cannot be above max.
Args: (Current: number
Target: number
T: number
)
Returns: number
Returns a value between Current
and Target
based on T
Args: (num: number
dec: number
)
Returns: number
Rounds of a number by decimal count (dec
)
Args: (n: number
min: number
max: number
)
Returns number
Gets a perfect value between the min and max value
Args: (min: number
max: number
)
Returns number
Generates a more percise and random number
Vector3 library which supports math operators
Type: table(Vector3)
Value: (1, 1, 1)
Type: table(Vector3)
Value: (0, 0, 0)
Args: (X: number?
Y: number?
Z: number?
)
Returns: table(Vector3)
Creates a new Vector3 with a set X, Y and Z coordinate, default components are all 0 if not entered.
Args: (vec: table(Teardown.Vec)
)
Returns: table(Vector3)
Converts a teardown Vec into a Vector3.
Args: (min: table(Vector3)
max: table(Vector3)
)
Returns: table(Vector3)
Creates a random Vector3 based on the min and max vectors
Args: (vector: table(Vector3)
min: table(Vector3) or number
max: table(Vector3) or number
)
Returns: table(Vector3)
Clamps a Vector3 X,Y,Z components to the min and max components or numbers
Args: (vector: table(Vector3)
)
Returns: table(Vector3)
Returns the absolute of X, Y and Z
Supports +, -, -v, *, / and ^ with numbers and other Vector3's
Type: number
The X component of the Vector3
Type: number
The Y component of the Vector3
Type: number
The Z component of the Vector3
Type: number
The magnitude / length of the Vector3
Type: number
The magnitude / length of the Vector3
Type: table(Vector3)
A copy of the Vector3 but with a magnitude of 1
Type: table(Vector3)
A copy of the Vector3 but with a magnitude of 1
Args: (self: table(Vector3)
)
Returns: number
number
number
Returns the X, Y and Z components as a tuple
Args: (self: table(Vector3)
)
Returns: Teardown.Vec
Converts the Vector3 into a Teardown Vec