Home Examples Installation Documentation Contact Help

to_angle

Specification

Location Author Maintained by
isl/math/quaternion.py Kenny Erleben DIKU

Purpose & Params

The purpose of to_angle is to find the angle of a given quaterion.

Example

    radian    = (0.5 * np.pi)/2
    axis      = np.array([0,1,0])
    axis_unit = axis / np.linalg.norm(axis)
    q  = quat.Ru(radian, axis_unit)
    print(quat.to_angle(q, axis_unit))

output:

   0.7853981633974484