Skip to content
Select language:English

ARDK 1.5.6

fun toQuaternion(yawDegree: Float): Quatf

Creates a quaternion representing a rotation around the Y axis.

Return

a quaternion representing the specified yaw rotation.

Parameters

yawDegree

the yaw angle, expressed in degrees.


fun toQuaternion(rollDegree: Float, yawDegree: Float): Quatf

Creates a quaternion representing a rotation composed of:

  • a roll rotation around the X axis

  • a yaw rotation around the Y axis

Return

a quaternion representing the combined roll and yaw rotations.

Parameters

rollDegree

the roll angle, expressed in degrees.

yawDegree

the yaw angle, expressed in degrees.


fun toQuaternion(q: FloatArray): Quatf

Creates a quaternion from a float array.

Supported formats are:

  • yaw (in degrees)

  • roll, yaw (in degrees)

  • x, y, z, w

If the array format is not recognized, the identity quaternion is returned.

Return

the corresponding quaternion.

Parameters

q

the quaternion or angle representation.