Loading

QROTATE

quaternions

Rotates a vector by a quaternion.

The QROTATE function consumes on the top of the stack three doubles representing a vector(x, y, z) and a long representing a quaternion and pushes back the vector rotated into 3 doubles (x, y, z with z being on top).

QROTATE is available since version 1.0.0.

Signatures

Examples

0.0 // X 0.0 // Y 1.0 // Z // Rotate by 90 degrees about y axis 0.7071 0.0 0.7071 0.0 ->Q QROTATE