Matrix3

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

Matrix3.add

Adds the other matrix to this one
Returns self for chaining
overload 1:
Matrix3:add(other)
Method Property Fluent Description Representation
other accepts a Matrix3
Return Value a Matrix3

Matrix3.scale

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

Matrix3.apply

Treats the given values as a vector, augments this vector with a 1, multiplies it against the matrix, and returns a deaugmented vector of the first values
overload 1:
Matrix3:apply(vec)
Method Property Fluent Description Representation
vec accepts a Vector2
Return Value a Vector2
overload 2:
Matrix3:apply(x, y)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
Return Value a Vector2

Matrix3.set

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

Matrix3.copy

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

Matrix3.reset

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

Matrix3.multiply

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

Matrix3.rotate

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

Matrix3.sub

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

Matrix3.rotateX

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

Matrix3.rotateY

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

Matrix3.rotateZ

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

Matrix3.applyDir

Treats the given values as a vector, augments this vector with a 0, multiplies it against the matrix, and returns a deaugmented vector of the first values
overload 1:
Matrix3:applyDir(vec)
Method Property Fluent Description Representation
vec accepts a Vector2
Return Value a Vector2
overload 2:
Matrix3:applyDir(x, y)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
Return Value a Vector2

Matrix3.deaugmented

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

Matrix3.invert

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

Matrix3.inverted

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

Matrix3.det

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

Matrix3.transpose

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

Matrix3.translate

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

Matrix3.getRow

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

Matrix3.augmented

Augments this matrix, adding an additional row and column
Puts a 1 along the diagonal in the new spot,
and the rest are zero
overload 1:
Matrix3:augmented()
Method Property Fluent Description Representation
Return Value a Matrix4

Matrix3.transposed

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

Matrix3.rightMultiply

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

Matrix3.getColumn

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