rotation_from_axis_angle

Function rotation_from_axis_angle 

Source
pub fn rotation_from_axis_angle<T: FloatScalar>(
    axis: &Vector3<T>,
    angle: T,
    epsilon: T,
) -> Option<Matrix4<T>>
Expand description

Creates a 4x4 rotation matrix from an axis and angle.

§Parameters

  • axis: The rotation axis (will be normalized)
  • angle: The rotation angle in radians
  • epsilon: Minimum axis length to treat as valid

§Returns

  • Some(matrix) for a valid axis
  • None if the axis length is too small