Skip to content

Misc math functions

Alessandro Febretti edited this page Feb 8, 2014 · 3 revisions

module omega

Quaternion quaternionFromEuler(float pitch, float yaw, float roll)

Converts euler angles to a quaternion. Angles are specified in radians.

Quaternion quaternionFromEulerDeg(float pitch, float yaw, float roll)

Converts euler angles to a quaternion. Angles are specified in degrees.

Vector3 quaternionToEuler(Quaternion q)

Converts a quaternion to euler angles. The returned vector contains pitch, yaw and roll in the x, y, and z vector components respectively. Angles are specified in radians.

Vector3 quaternionToEulerDeg(Quaternion q)

Converts a quaternion to euler angles. The returned vector contains pitch, yaw and roll in the x, y, and z vector components respectively. Angles are specified in degrees.

Clone this wiki locally