pub fn rotation(angle: T, axis: Vec3<T>) -> Quaternion<T> {
        let axis = axis.normalize();
        let angle = angle / (T::ONE + T::ONE);
        let (sin, cos) = angle.sin_cos();

        Quaternion {
            x: axis.x*sin,
            y: axis.y*sin,
            z: axis.z*sin,
            w: cos,
        }
    }
/// Creates a quaternion representing a counterclockwise rotation of `angle` radians around the 
/// given axis. This function normalizes the axis, but if the axis is `(0, 0, 0)` the quaternion
/// will have its `x`, `y` and `z` fields set to 0.
Creates a quaternion representing a counterclockwise rotation of `angle` radians around the
given axis.
Creates a quaternion representing a counterclockwise rotation of ` angle ` radians around the given axis .
pub fn rotation(angle: T, axis: Vec3<T>) -> Quaternion<T> {
        let axis = axis.normalize();
        let angle = angle / (T::ONE + T::ONE);
        let (sin, cos) = angle.sin_cos();
        Quaternion {
            x: axis.x*sin,
            y: axis.y*sin,
            z: axis.z*sin,
            w: cos,
        }
    }
pub fn rotation ( angle : T , axis : Vec3 < T > ) -> Quaternion < T > { let axis = axis . normalize ( ) ; let angle = angle / ( T :: ONE + T :: ONE ) ; let ( sin , cos ) = angle . sin_cos ( ) ; Quaternion { x : axis . x * sin , y : axis . y * sin , z : axis . z * sin , w : cos , } }
Creates a quaternion representing a counterclockwise rotation of `angle` radians around the
given axis.
Creates a quaternion representing a counterclockwise rotation of ` angle ` radians around the given axis .
angle
T
axis
Vec3<T>
angle
T
axis
Vec3<T>