Personal tools

Lua/Shared/Vector3

From JC2-MP Documentation

< Lua‎ | Shared
Jump to: navigation, search

Static functions

Returns Prototype
Vector3 Cross(Vector3, Vector3)
number Distance(Vector3, Vector3)
number Distance2D(Vector3, Vector3)
number DistanceSqr(Vector3, Vector3)
number DistanceSqr2D(Vector3, Vector3)
number Dot(Vector3, Vector3)
Vector3 Reflect(Vector3, Vector3)

Constructors

Constructor
Vector3(number, number, number)
Vector3()

Functions

Returns Prototype
Vector3 Cross(Vector3)
number Distance(Vector3)
number Distance2D(Vector3)
number DistanceSqr(Vector3)
number DistanceSqr2D(Vector3)
number Dot(Vector3)
boolean IsNaN()
number Length()
number LengthSqr()
Normalize()
Vector3 Normalized()
Vector3 Reflect(Vector3)

Operators

Returns Prototype
Vector3 Vector3 + Vector3
Vector3 Vector3 / number
boolean Vector3 == Vector3
Vector3 Vector3 * number
Vector3 number * Vector3
Vector3 Vector3 - Vector3
string tostring(Vector3)
Vector3 -Vector3

Properties

Name Type
x number
y number
z number

Statics

Name Value
Zero Vector3(0, 0, 0)
One Vector3(1, 1, 1)
Forward Vector3(0, 0, -1)
Backward Vector3(0, 0, 1)
Up Vector3(0, 1, 0)
Down Vector3(0, -1, 0)
Left Vector3(-1, 0, 0)
Right Vector3(1, 0, 0)