Function rotate

Source
pub fn rotate<T>(
    m: &Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>,
    angle: T,
    axis: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>,
) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
where T: RealNumber,
Expand description

Builds a rotation 4 * 4 matrix created from an axis vector and an angle and right-multiply it to m.

§Parameters:

  • m − Input matrix multiplied by this rotation matrix.
  • angle − Rotation angle expressed in radians.
  • axis − Rotation axis, recommended to be normalized.

§See also: