New |
Vector Vector.New(number x, number y, number z) |
Construct a new Vector with the given x, y and z components, where z is generally up. |
|
Normalize |
Vector vec:Normalize() |
Return a normalized Vector (where the length is 1.0) |
|
Length |
number vec:Length() |
Return the length of the given Vector. |
|
SquaredLength |
number vec:SquaredLength() |
Return the square of the length of the given Vector. |
|
Distance |
number Vector.Distance(Vector vec1, Vector vec2) |
Return the distance between two Vector values. |
|
SquaredDistance |
number Vector.SquaredDistance(Vector vec1, Vector vec2) |
Return the square of the distance of two Vector values. |
|
Cross |
Vector Vector.Cross(Vector vec1, Vector vec2) |
Return the cross product of two Vector values. |
|
Dot |
number Vector.Dot(Vector vec1, Vector vec2) |
Return the dot product of two Vector values. |
|
Lerp |
Vector Vector.Lerp(Vector vec1, Vector vec2, number alpha) |
Linearly interpolate between vec1 and vec2 by the fraction alpha, where alpha is normally in the range [0,1] |
|
Abs |
Vector vec:Abs() |
Return a Vector constructed from the absolute (ie positive or zero) x, y and z components of the given Vector. |
|
Ceil |
Vector vec:Ceil() |
Returns a Vector constructed from the ceiling (ie next integer value) x, y and z components of the given Vector. |
|
Floor |
Vector vec:Floor() |
Returns a Vector constructed from the floor (ie integer value below) x, y and z components of the given Vector. |
|