Transforms a 4D vector by a 4x4 matrix.
The 4x4 transformation matrix.
The 4D vector to transform (x, y, z, w).
An optional array to store the result. If not provided, a new vector is created.
The transformed 4D vector.
Transforms a 4D vector by a 4x4 matrix.