Nothing too complicated, you just use the *
multiplication operator. Note though that it only makes sense to multiply a mat4
by another mat4
(4x4), vec4
(4x1), or other 4x? matrix.
If you're just aiming for 2D scaling and rotation, you probably want to start with a mat2
. mat2 * vec2 = vec2