Matrix4

A matrix with 4 rows and 4 columns
Meta name Allowed other parameters Meta execution method
__le
  • Matrix4
x <= y
__eq
  • Matrix4
x == y
__mul
  • Number
  • Matrix4
  • Vector4
x * y
__add
  • Matrix4
x + y
__sub
  • Matrix4
x - y
__len
#x

Matrix4.add

Adds the other matrix to this one
Returns self for chaining
overload 1:
Matrix4:add()
typings.778481971
Method Property Fluent Description Representation
Return Value

Matrix4.scale

Scales this matrix by the specified amount, changing the values inside
Returns self for chaining
overload 1:
Matrix4:scale(vec)
Method Property Fluent Description Representation
vec accepts a Vector3
Return Value a Matrix4
overload 2:
Matrix4:scale(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a Matrix4

Matrix4.set

Sets this matrix to have the same values as the matrix passed in
Returns self for chaining
overload 1:
Matrix4:set(other)
Method Property Fluent Description Representation
other accepts a Matrix4
Return Value a Matrix4

Matrix4.copy

Creates and returns a new copy of this matrix
overload 1:
Matrix4:copy()
Method Property Fluent Description Representation
Return Value a Matrix4

Matrix4.reset

Resets this matrix back to the identity matrix
Returns self for chaining
overload 1:
Matrix4:reset()
Method Property Fluent Description Representation
Return Value a Matrix4

Matrix4.multiply

Multiplies this matrix by the other matrix, with the other matrix on the left
Returns self for chaining
overload 1:
Matrix4:multiply(other)
typings.778481971
Method Property Fluent Description Representation
other accepts a Matrix4
Return Value

Matrix4.rotate

Rotates this matrix by the specified amount, changing the values inside
Angles are given in degrees
Returns self for chaining
overload 1:
Matrix4:rotate(vec)
Method Property Fluent Description Representation
vec accepts a Vector3
Return Value a Matrix4
overload 2:
Matrix4:rotate(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a Matrix4

Matrix4.sub

Subtracts the other matrix from this one
Returns self for chaining
overload 1:
Matrix4:sub()
Method Property Fluent Description Representation
Return Value a Matrix4

Matrix4.invert

Inverts this matrix, changing the values inside
Returns self for chaining
overload 1:
Matrix4:invert()
typings.778481971
Method Property Fluent Description Representation
Return Value

Matrix4.getColumn

Gets the given column of this matrix, as a vector
Indexing starts at 1,
as usual
overload 1:
Matrix4:getColumn(col)
Method Property Fluent Description Representation
col accepts an Integer
Return Value a Vector4

Matrix4.inverted

Returns a copy of this matrix, but inverted
overload 1:
Matrix4:inverted()
Method Property Fluent Description Representation
Return Value a Matrix4

Matrix4.rotateY

Rotates this matrix around the Y axis by the specified number of degrees
Returns self for chaining
overload 1:
Matrix4:rotateY(degrees)
Method Property Fluent Description Representation
degrees accepts a Number
Return Value a Matrix4

Matrix4.rightMultiply

Multiplies this matrix by the other matrix, with the other matrix on the right
Returns self for chaining
overload 1:
Matrix4:rightMultiply(other)
typings.778481971
Method Property Fluent Description Representation
other accepts a Matrix4
Return Value

Matrix4.translate

Translates this matrix by the specified amount, changing the values inside
Returns self for chaining
overload 1:
Matrix4:translate(vec)
Method Property Fluent Description Representation
vec accepts a Vector3
Return Value a Matrix4
overload 2:
Matrix4:translate(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a Matrix4

Matrix4.transpose

Transposes this matrix, changing the values inside
Transposing means to swap the rows and the columns
Returns self for chaining
overload 1:
Matrix4:transpose()
Method Property Fluent Description Representation
Return Value a Matrix4

Matrix4.rotateZ

Rotates this matrix around the Z axis by the specified number of degrees
Returns self for chaining
overload 1:
Matrix4:rotateZ(degrees)
Method Property Fluent Description Representation
degrees accepts a Number
Return Value a Matrix4

Matrix4.rotateX

Rotates this matrix around the X axis by the specified number of degrees
Returns self for chaining
overload 1:
Matrix4:rotateX(degrees)
Method Property Fluent Description Representation
degrees accepts a Number
Return Value a Matrix4

Matrix4.transposed

Returns a copy of this matrix, but transposed
Transposing means to swap the rows and the columns
overload 1:
Matrix4:transposed()
Method Property Fluent Description Representation
Return Value a Matrix4

Matrix4.det

Calculates and returns the determinant of this matrix
overload 1:
Matrix4:det()
Method Property Fluent Description Representation
Return Value a Number

Matrix4.getRow

Gets the given row of this matrix, as a vector
Indexing starts at 1,
as usual
overload 1:
Matrix4:getRow(row)
Method Property Fluent Description Representation
row accepts an Integer
Return Value a Vector

Matrix4.deaugmented

Deaugments this matrix, removing a row and column
overload 1:
Matrix4:deaugmented()
Method Property Fluent Description Representation
Return Value a Matrix3
a a