This class describes a quaternion rotation. Quaternions are more accurate than Euler angles and do not suffer from Gimbal lock, but they more difficult to intuitively understand.


Name Type Description
Quat Constructor Quat(const float x, const float y, const float z, const float w)
Quat Constructor Quat(const Vec3& euler)
Quat Constructor Quat(const float angle, const Vec3& axis)
x float X component
y float Y component
z float Z component
w float W component
Inverse Method gets the inverse quaternion
Normalize Method gets the normalized quaternion
Slerp Method spherical linear interpolation for smooth transitions between 3D rotations
ToEuler Method converts the quaternion to a Euler angle
Copyright © 2023 Ultra Software.
All rights reserved.