fromQuaternion

fun fromQuaternion(quaternion: Quaternion, result: HeadingPitchRoll? = definedExternally): HeadingPitchRoll(source)

Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )

Return

The modified result parameter or a new HeadingPitchRoll instance if one was not provided.

Parameters

quaternion

The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.

result

The object in which to store the result. If not provided, a new instance is created and returned.

See also