Mat4:mul
EditMultiplies this matrix by another value. Multiplying by a matrix combines their two transforms together. Multiplying by a vector applies the transformation from the matrix to the vector and returns the vector.
Arguments
Name | Type | Description |
n | Mat4 | The matrix. |
Returns
Name | Type | Description |
self | Mat4 | The modified matrix. |
Arguments
Name | Type | Description |
v3 | Vec3 | A 3D vector, treated as a point. |
Returns
Name | Type | Description |
v3 | Vec3 | The transformed vector. |
Arguments
Name | Type | Description |
v4 | Vec4 | A 4D vector. |
Returns
Name | Type | Description |
v4 | Vec4 | The transformed vector. |
Notes
When multiplying by a vec4, the vector is treated as either a point if its w component is 1, or a direction vector if the w is 0 (the matrix translation won't be applied).