Mat4:mul

Edit

Multiplies 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

NameTypeDescription
nMat4 The matrix.

Returns

NameTypeDescription
selfMat4 The modified matrix.

Arguments

NameTypeDescription
v3Vec3 A 3D vector, treated as a point.

Returns

NameTypeDescription
v3Vec3 The transformed vector.

Arguments

NameTypeDescription
v4Vec4 A 4D vector.

Returns

NameTypeDescription
v4Vec4 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).

See also