mat2
ClassA 2x2 matrix.
- Available on all platforms
Index
Properties
Methods
Constructors
Constructor
new mat2():
mat2
Returns
mat2
Properties
column0
column0:
vec2
The first column of the matrix.
column1
column1:
vec2
The second column of the matrix.
description
description:
string
Returns a string representation of the matrix.
Methods
add()
add(
mat):mat2
Returns the result of adding the two matrices together.
Parameters
| Parameter | Type |
|---|---|
mat | mat2 |
Returns
mat2
determinant()
determinant():
number
Returns the determinant of the matrix.
Returns
number
div()
div(
mat):mat2
Returns the result of dividing the two matrices.
Parameters
| Parameter | Type |
|---|---|
mat | mat2 |
Returns
mat2
equal()
equal(
mat):boolean
Returns whether the two matrices are equal.
Parameters
| Parameter | Type |
|---|---|
mat | mat2 |
Returns
boolean
identity()
staticidentity():mat2
Returns the identity matrix.
Returns
mat2
inverse()
inverse():
mat2
Returns the inverse of the matrix.
Returns
mat2
mult()
mult(
mat):mat2
Returns the result of multiplying the two matrices.
Parameters
| Parameter | Type |
|---|---|
mat | mat2 |
Returns
mat2
multiplyScalar()
multiplyScalar(
scalar):mat2
Returns the result of scalar multiplying the matrix.
Parameters
| Parameter | Type |
|---|---|
scalar | number |
Returns
mat2
sub()
sub(
mat):mat2
Returns the result of subtracting the two matrices.
Parameters
| Parameter | Type |
|---|---|
mat | mat2 |
Returns
mat2
toString()
toString():
string
Returns a string representation of the matrix.
Returns
string
transpose()
transpose():
mat2
Returns the transpose of this matrix.
Returns
mat2
zero()
staticzero():mat2
Returns a matrix with all zero values.
Returns
mat2