Mat4:rotate

Rotates the matrix using a quaternion or an angle/axis rotation.


m = Mat4:rotate(q)

Arguments

NameTypeDescription
qQuat The rotation to apply to the matrix.

Returns

NameTypeDescription
mMat4 The original matrix.

m = Mat4:rotate(angle, ax, ay, az)

Arguments

NameTypeDefaultDescription
anglenumber The angle component of the angle/axis rotation (radians).
axnumber0 The x component of the axis of rotation.
aynumber1 The y component of the axis of rotation.
aznumber0 The z component of the axis of rotation.

Returns

NameTypeDescription
mMat4 The original matrix.

See also