Function getAxisAngle

  • Gets the rotation axis and angle for a given quaternion. If a quaternion is created with setAxisAngle, this method will return the same values as providied in the original parameter list OR functionally equivalent values. Example: The quaternion formed by axis [0, 0, 1] and angle -90 is the same as the quaternion formed by [0, 0, 1] and 270. This method favors the latter.

    Parameters

    • out_axis: vec3

      Vector receiving the axis of rotation

    • q: ReadonlyQuat

      Quaternion to be decomposed

    Returns number

    Angle, in radians, of the rotation

Generated using TypeDoc