Mat3 Class
A 3x3 matrix.
Constructor
Mat3
(
-
array
Parameters:
-
arrayObjectelements Array of nine elements. Optional.
Item Index
Methods
Properties
Methods
copy
(
Mat3
-
source
Copy another matrix into this matrix object.
Parameters:
-
sourceMat3
Returns:
Mat3:
this
e
(
Number
-
row -
column -
value
Get an element in the matrix by index. Index starts at 0, not 1!!!
Parameters:
-
rowNumber -
columnNumber -
valueNumberOptional. If provided, the matrix element will be set to this value.
Returns:
Number:
identity
()
Sets the matrix to identity
mmult
(
Mat3
-
m
Matrix multiplication
Parameters:
-
mMat3Matrix to multiply with from left side.
Returns:
Mat3:
The result.
reverse
(
Mat3
-
target
reverse the matrix
Parameters:
-
targetMat3Optional. Target matrix to save in.
Returns:
Mat3:
The solution x
setZero
()
Set all elements to zero
smult
(
-
s
Matrix-scalar multiplication
Parameters:
-
sNumber
toString
()
Returns a string representation of the matrix.
Returns:
string
Properties
elements
Array
A vector of length 9, containing all matrix elements
