Members
(static) identity
An identity Matrix2.
- Source:
(static) zero
A Matrix2 with all elements equal to zero.
- Source:
Methods
clone() → {Matrix2}
Creates a clone of the matrix.
- Source:
Returns:
The cloned matrix.
- Type
- Matrix2
copy(matrix) → {Matrix2}
Copies the elements from another matrix.
Parameters:
Name | Type | Description |
---|---|---|
matrix |
Matrix2 | The matrix to copy the elements from. |
- Source:
Returns:
The matrix.
- Type
- Matrix2
equals(matrix) → {Boolean}
Compares if the elements of the matrix are equal to the elements of another matrix.
Parameters:
Name | Type | Description |
---|---|---|
matrix |
Matrix2 | The matrix to compare the components to. |
- Source:
Returns:
A value indicating whether all the elements are equal.
- Type
- Boolean
set(a00, a01, a10, a11) → {Matrix2}
Sets the elements of the matrix.
Parameters:
Name | Type | Description |
---|---|---|
a00 |
Number | The element at row 0 and column 0. |
a01 |
Number | The element at row 0 and column 1. |
a10 |
Number | The element at row 1 and column 0. |
a11 |
Number | The element at row 1 and column 1. |
- Source:
Returns:
The matrix.
- Type
- Matrix2
setIdentity() → {Matrix2}
Sets the elements of the matrix to the identity.
- Source:
Returns:
The matrix.
- Type
- Matrix2
transpose() → {Matrix2}
Transposes the matrix.
- Source:
Returns:
The matrix.
- Type
- Matrix2
(static) fromValues(a00, a01, a10, a11) → {Matrix2}
Creates a new Matrix2 from the values of each element.
Parameters:
Name | Type | Description |
---|---|---|
a00 |
Number | The element at row 0 and column 0. |
a01 |
Number | The element at row 0 and column 1. |
a10 |
Number | The element at row 1 and column 0. |
a11 |
Number | The element at row 1 and column 1. |
- Source:
Returns:
The created matrix.
- Type
- Matrix2