Mat4:rotate

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

m = Mat4:rotate(q)

Arguments

NameTypeDescription
qQuatThe rotation to apply to the matrix.

Returns

NameTypeDescription
mMat4The original matrix.

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

Arguments

NameTypeDefaultDescription
anglenumberThe angle component of the angle/axis rotation (radians).
axnumber0The x component of the axis of rotation.
aynumber1The y component of the axis of rotation.
aznumber0The z component of the axis of rotation.

Returns

NameTypeDescription
mMat4The original matrix.

See also