pub fn rotation(radians: f32, axis: Vec3<f32>) -> Quat {
        let a = axis.normalized();
        let r = radians / 2.0;
        let s = r.sin();

        Quat {
            x: a.x * s,
            y: a.y * s,
            z: a.z * s,
            w: r.cos(),
        }
    }
/// Constructs a rotation quaternion from an angle and an axis.
///
/// # Examples
///
/// ```
/// use gamemath::{Vec3, Quat};
///
/// let q = Quat::rotation(1.0, Vec3::new(1.0, 2.0, 3.0));
///
/// assert_eq!(q, (0.12813187, 0.25626373, 0.38439557, 0.87758255).into());
/// ```
Constructs a rotation quaternion from an angle and an axis.
Constructs a rotation quaternion from an angle and an axis .
pub fn rotation(radians: f32, axis: Vec3<f32>) -> Quat {
        let a = axis.normalized();
        let r = radians / 2.0;
        let s = r.sin();
        Quat {
            x: a.x * s,
            y: a.y * s,
            z: a.z * s,
            w: r.cos(),
        }
    }
pub fn rotation ( radians : f32 , axis : Vec3 < f32 > ) -> Quat { let a = axis . normalized ( ) ; let r = radians / 2.0 ; let s = r . sin ( ) ; Quat { x : a . x * s , y : a . y * s , z : a . z * s , w : r . cos ( ) , } }
Constructs a rotation quaternion from an angle and an axis.
Constructs a rotation quaternion from an angle and an axis .
radians
f32
axis
Vec3<f32>
radians
f32
axis
Vec3<f32>
examples
None