Vector5

figura.docs.vector5
Meta name Allowed other parameters Meta execution method
__le
  • Vector5
x <= y
__lt
  • Vector5
x < y
__len
#x
__unm
-x
__eq
  • Vector5
x == y
__mod
  • Number
  • Vector5
x % y
__div
  • Number
  • Vector5
x / y
__mul
  • Number
  • Vector5
x * y
__add
  • Vector5
x + y
__sub
  • Vector5
x - y

Vector5.add

Adds the given vector or values to this one, and returns self for chaining
overload 1:
Vector5:add(vec)
typings.2002444082typings.2002444082
Method Property Fluent Description Representation
vec accepts
Return Value
overload 2:
Vector5:add(x, y, z, w, t)
typings.2002444082
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
w accepts a Number
t accepts a Number
Return Value

Vector5.length

Returns the length of this vector
overload 1:
Vector5:length()
Method Property Fluent Description Representation
Return Value a Number

Vector5.floor

Returns a copy of this vector with its values rounded down
overload 1:
Vector5:floor()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.ceil

Returns a copy of this vector with its values rounded up
overload 1:
Vector5:ceil()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.scale

Scales this vector by the given factor, and returns self for chaining
overload 1:
Vector5:scale(factor)
typings.2002444082
Method Property Fluent Description Representation
factor accepts a Number
Return Value

Vector5.dot

Returns the dot product of this vector with the other
overload 1:
Vector5:dot(vec)
typings.2002444082
Method Property Fluent Description Representation
vec accepts
Return Value a Number

Vector5.set

Sets this vector to have the given values
Nil values are treated as zero
Returns self for chaining
overload 1:
Vector5:set(vec)
typings.2002444082typings.2002444082
Method Property Fluent Description Representation
vec accepts
Return Value
overload 2:
Vector5:set(x, y, z, w, t)
typings.2002444082
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
w accepts a Number
t accepts a Number
Return Value

Vector5.copy

Creates and returns a copy of this vector
overload 1:
Vector5:copy()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.normalize

Modifies this vector so that its length is 1 unless its length was originally 0
Returns self for chaining
overload 1:
Vector5:normalize()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.reset

Resets this vector back to being all zeroes, and returns itself for chaining
overload 1:
Vector5:reset()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.reduce

Reduces this vector modulo the given vector or values, and returns self for chaining
overload 1:
Vector5:reduce(vec)
typings.2002444082typings.2002444082
Method Property Fluent Description Representation
vec accepts
Return Value
overload 2:
Vector5:reduce(x, y, z, w, t)
typings.2002444082
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
w accepts a Number
t accepts a Number
Return Value

Vector5.normalized

Returns a copy of this vector with length 1 unless its length was originally 0
overload 1:
Vector5:normalized()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.sub

Subtracts the given vector or values from this one, and returns self for chaining
overload 1:
Vector5:sub(vec)
typings.2002444082typings.2002444082
Method Property Fluent Description Representation
vec accepts
Return Value
overload 2:
Vector5:sub(x, y, z, w, t)
typings.2002444082
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
w accepts a Number
t accepts a Number
Return Value

Vector5.mul

Multiplies the given vector or values into this one, and returns self for chaining
overload 1:
Vector5:mul(vec)
typings.2002444082typings.2002444082
Method Property Fluent Description Representation
vec accepts
Return Value
overload 2:
Vector5:mul(x, y, z, w, t)
typings.2002444082
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
w accepts a Number
t accepts a Number
Return Value

Vector5.div

Divides this vector by the given vector or values, and returns self for chaining
overload 1:
Vector5:div(vec)
typings.2002444082typings.2002444082
Method Property Fluent Description Representation
vec accepts
Return Value
overload 2:
Vector5:div(x, y, z, w, t)
typings.2002444082
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
w accepts a Number
t accepts a Number
Return Value

Vector5.clamped

Returns a modified copy of this vector, with its length clamped from minLength to maxLength
If the vector has length zero,
then the copy does too
overload 1:
Vector5:clamped(minLength, maxLength)
typings.2002444082
Method Property Fluent Description Representation
minLength accepts a Number
maxLength accepts a Number
Return Value

Vector5.lengthSquared

Returns the length of this vector squared
Suitable when you only care about relative lengths,
because it avoids a square root
overload 1:
Vector5:lengthSquared()
Method Property Fluent Description Representation
Return Value a Number

Vector5.toDeg

Returns a copy of this vector, in degrees
overload 1:
Vector5:toDeg()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.toRad

Returns a copy of this vector, in radians
overload 1:
Vector5:toRad()
typings.2002444082
Method Property Fluent Description Representation
Return Value

Vector5.applyFunc

Calls the given function on each element of this vector, and sets the values of the vector to the returns
The current index and its value is given as arguments of the function
Returns self for chaining
overload 1:
Vector5:applyFunc(func)
typings.2002444082
Method Property Fluent Description Representation
func accepts a function that takes a Number and an Integer and will return a Number
Return Value

Vector5.clampLength

Modifies this vector so that its length is between minLength and maxLength
If the vector has length zero,
it is unmodified
Returns self for chaining
overload 1:
Vector5:clampLength(minLength, maxLength)
typings.2002444082
Method Property Fluent Description Representation
minLength accepts a Number
maxLength accepts a Number
Return Value

Vector5.x

The first coordinate of this vector
Can also be gotten with the indices "r" and [1]
field signature:
x
Method Property Fluent Description Representation
Field Type a Number

Vector5.y

The second coordinate of this vector
Can also be gotten with the indices "g" and [2]
field signature:
y
Method Property Fluent Description Representation
Field Type a Number

Vector5.z

The third coordinate of this vector
Can also be gotten with the indices "b" and [3]
field signature:
z
Method Property Fluent Description Representation
Field Type a Number

Vector5.w

The fourth coordinate of this vector
Can also be gotten with the indices "a" and [4]
field signature:
w
Method Property Fluent Description Representation
Field Type a Number

Vector5.t

figura.docs.vector_n.t
field signature:
t
Method Property Fluent Description Representation
Field Type a Number
a a