Methods
# (static) adjoint(out, a) → {mat3}
- Source:
Calculates the adjugate of a mat3
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the source matrix |
Returns:
out
- Type
- mat3
# (static) clone(a) → {mat3}
- Source:
Creates a new mat3 initialized with values from an existing matrix
Parameters:
Name | Type | Description |
---|---|---|
a |
mat3 | matrix to clone |
Returns:
a new 3x3 matrix
- Type
- mat3
# (static) copy(out, a) → {mat3}
- Source:
Copy the values from one mat3 to another
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the source matrix |
Returns:
out
- Type
- mat3
# (static) create() → {mat3}
- Source:
Creates a new identity mat3
Returns:
a new 3x3 matrix
- Type
- mat3
# (static) determinant(a) → {Number}
- Source:
Calculates the determinant of a mat3
Parameters:
Name | Type | Description |
---|---|---|
a |
mat3 | the source matrix |
Returns:
determinant of a
- Type
- Number
# (static) frob(a) → {Number}
- Source:
Returns Frobenius norm of a mat3
Parameters:
Name | Type | Description |
---|---|---|
a |
mat3 | the matrix to calculate Frobenius norm of |
Returns:
Frobenius norm
- Type
- Number
# (static) fromMat2d(out, a) → {mat3}
- Source:
Copies the values from a mat2d into a mat3
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat2d | the matrix to copy |
Returns:
out
- Type
- mat3
# (static) fromMat4(out, a) → {mat3}
- Source:
Copies the upper-left 3x3 values into the given mat3.
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving 3x3 matrix |
a |
mat4 | the source 4x4 matrix |
Returns:
out
- Type
- mat3
# (static) fromQuat(out, q) → {mat3}
- Source:
Calculates a 3x3 matrix from the given quaternion
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | mat3 receiving operation result |
q |
quat | Quaternion to create matrix from |
Returns:
out
- Type
- mat3
# (static) identity(out) → {mat3}
- Source:
Set a mat3 to the identity matrix
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
Returns:
out
- Type
- mat3
# (static) invert(out, a) → {mat3}
- Source:
Inverts a mat3
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the source matrix |
Returns:
out
- Type
- mat3
# (static) mul()
- Source:
Alias for mat3.multiply
# (static) multiply(out, a, b) → {mat3}
- Source:
Multiplies two mat3's
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the first operand |
b |
mat3 | the second operand |
Returns:
out
- Type
- mat3
# (static) normalFromMat4(out, a) → {mat3}
- Source:
Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | mat3 receiving operation result |
a |
mat4 | Mat4 to derive the normal matrix from |
Returns:
out
- Type
- mat3
# (static) rotate(out, a, rad) → {mat3}
- Source:
Rotates a mat3 by the given angle
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the matrix to rotate |
rad |
Number | the angle to rotate the matrix by |
Returns:
out
- Type
- mat3
# (static) scale(out, a, v) → {mat3}
- Source:
Scales the mat3 by the dimensions in the given vec2
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the matrix to rotate |
v |
vec2 | the vec2 to scale the matrix by |
Returns:
out
- Type
- mat3
# (static) translate(out, a, v) → {mat3}
- Source:
Translate a mat3 by the given vector
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the matrix to translate |
v |
vec2 | vector to translate by |
Returns:
out
- Type
- mat3
# (static) transpose(out, a) → {mat3}
- Source:
Transpose the values of a mat3
Parameters:
Name | Type | Description |
---|---|---|
out |
mat3 | the receiving matrix |
a |
mat3 | the source matrix |
Returns:
out
- Type
- mat3