Efficiently applies scaling to a 4x4 matrix.
The scaling vector (x, y, z).
The matrix to apply the scaling to. Defaults to the identity matrix if not provided.
The matrix with the scaling applied.
Efficiently applies scaling to a 4x4 matrix.