Mat3 Class
A 3x3 matrix.
Constructor
Mat3
(
-
array
Parameters:
-
array
Objectelements Array of nine elements. Optional.
Item Index
Methods
Properties
Methods
copy
(
Mat3
-
source
Copy another matrix into this matrix object.
Parameters:
-
source
Mat3
Returns:
Mat3:
this
e
(
Number
-
row
-
column
-
value
Get an element in the matrix by index. Index starts at 0, not 1!!!
Parameters:
-
row
Number -
column
Number -
value
NumberOptional. 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:
-
m
Mat3Matrix to multiply with from left side.
Returns:
Mat3:
The result.
reverse
(
Mat3
-
target
reverse the matrix
Parameters:
-
target
Mat3Optional. Target matrix to save in.
Returns:
Mat3:
The solution x
setZero
()
Set all elements to zero
smult
(
-
s
Matrix-scalar multiplication
Parameters:
-
s
Number
toString
()
Returns a string representation of the matrix.
Returns:
string
Properties
elements
Array
A vector of length 9, containing all matrix elements