wiki:vector3
Vector3
Vector3 is a global meta-table composed of 3 numbers (Its data) and some functions to manipulate these data.
Data
x: number
y: number
z: number
Functions
Operators
__unm(Vector3)
__add(Vector3, Vector3)
__sub(Vector3, Vector3)
__mul(Vector3, number)
__div(Vector3, number)
__tostring(Vector3)
new()
new(number, number, number)
Description: Create an instance of Vector3 with the given values
Signature: (x: number, y: number, z: number): Vector3
One()
Zero()
Forward()
Up()
Right()
Backward()
Down()
Left()
Length(Vector3)
Distance(Vector3)
Normalize(Vector3)
Dot(Vector3, Vector3)
Description: Returns the dot product of the two given Vector3
Signature: (left: Vector3, right: Vector3): number
Cross(Vector3, Vector3)
Description: Returns the crossproduct of the two given Vector3
Signature: (left: Vector3, right: Vector3): Vector3
Lerp(Vector3, Vector3, number)
Description: Calculate the linear interpolation between two Vector3 using the given alpha
Signature: (start: Vector3, end: Vector3, alpha: number): Vector3
AngleBetween(Vector3, Vector3)
Description: Calculate the angle between two Vector3
Signature: (left: Vector3, right: Vector3): number
wiki/vector3.txt · Last modified: 2019/09/19 19:49 (external edit)