Rotations as unit quaternions {x, y, z, w}.
q = Cauldron3D.Quat.from_euler({0.0, 0.0, :math.pi() / 2})
Cauldron3D.Quat.rotate(q, {1.0, 0.0, 0.0})
#=> {0.0, 1.0, 0.0}
Summary
Functions
The rotation turning x radians about the x axis, then y about the y axis, then z
about the z axis.
No rotation.
q scaled to unit length.
vector turned by q.
The rotation t of the way from a to b, along the shorter arc.
The rotation as the rows of a 3 by 3 matrix.
Types
Functions
@spec from_euler(Cauldron3D.Vec.t()) :: t()
The rotation turning x radians about the x axis, then y about the y axis, then z
about the z axis.
@spec identity() :: t()
No rotation.
q scaled to unit length.
@spec rotate(t(), Cauldron3D.Vec.t()) :: Cauldron3D.Vec.t()
vector turned by q.
The rotation t of the way from a to b, along the shorter arc.
@spec to_rows(t()) :: {Cauldron3D.Vec.t(), Cauldron3D.Vec.t(), Cauldron3D.Vec.t()}
The rotation as the rows of a 3 by 3 matrix.