Quat

Associated namespace: sm.quat

A userdata object representing a quaternion.

Values:

Operations:

OperationDescription
Quat == QuatChecks if two quaternions are equal.
Quat * QuatReturns the Hamilton product of two quaternions.
Quat * Vec3Returns the rotation by a quaternion on a vector.

w number

Get:

Returns the W value of a quaternion.

Set:

Sets the W value of a quaternion.


x number

Get:

Returns the X value of a quaternion.

Set:

Sets the X value of a quaternion.


y number

Get:

Returns the Y value of a quaternion.

Set:

Sets the Y value of a quaternion.


z number

Get:

Returns the Z value of a quaternion.

Set:

Sets the Z value of a quaternion.