pub fn new(x: f32, y: f32, z: f32) -> Quaternion {
        let x2 = x / 2.0;
        let y2 = y / 2.0;
        let z2 = z / 2.0;

        let x2_cos = x2.cos();
        let y2_cos = y2.cos();
        let z2_cos = z2.cos();

        let x2_sin = x2.sin();
        let y2_sin = y2.sin();
        let z2_sin = z2.sin();

        Quaternion {
            x: x2_sin * y2_cos * z2_cos - x2_cos * y2_sin * z2_sin,
            y: x2_cos * y2_sin * z2_cos + x2_sin * y2_cos * z2_sin,
            z: x2_cos * y2_cos * z2_sin - x2_sin * y2_sin * z2_cos,
            w: x2_cos * y2_cos * z2_cos + x2_sin * y2_sin * z2_sin,
        }
    }
/// Returns a new `Quaternion` with a rotation of x, y, z in radians.
Returns a new `Quaternion` with a rotation of x, y, z in radians.
Returns a new ` Quaternion ` with a rotation of x y z in radians .
pub fn new(x: f32, y: f32, z: f32) -> Quaternion {
        let x2 = x / 2.0;
        let y2 = y / 2.0;
        let z2 = z / 2.0;
        let x2_cos = x2.cos();
        let y2_cos = y2.cos();
        let z2_cos = z2.cos();
        let x2_sin = x2.sin();
        let y2_sin = y2.sin();
        let z2_sin = z2.sin();
        Quaternion {
            x: x2_sin * y2_cos * z2_cos - x2_cos * y2_sin * z2_sin,
            y: x2_cos * y2_sin * z2_cos + x2_sin * y2_cos * z2_sin,
            z: x2_cos * y2_cos * z2_sin - x2_sin * y2_sin * z2_cos,
            w: x2_cos * y2_cos * z2_cos + x2_sin * y2_sin * z2_sin,
        }
    }
pub fn new ( x : f32 , y : f32 , z : f32 ) -> Quaternion { let x2 = x / 2.0 ; let y2 = y / 2.0 ; let z2 = z / 2.0 ; let x2_cos = x2 . cos ( ) ; let y2_cos = y2 . cos ( ) ; let z2_cos = z2 . cos ( ) ; let x2_sin = x2 . sin ( ) ; let y2_sin = y2 . sin ( ) ; let z2_sin = z2 . sin ( ) ; Quaternion { x : x2_sin * y2_cos * z2_cos - x2_cos * y2_sin * z2_sin , y : x2_cos * y2_sin * z2_cos + x2_sin * y2_cos * z2_sin , z : x2_cos * y2_cos * z2_sin - x2_sin * y2_sin * z2_cos , w : x2_cos * y2_cos * z2_cos + x2_sin * y2_sin * z2_sin , } }
Returns a new `Quaternion` with a rotation of x, y, z in radians.
Returns a new ` Quaternion ` with a rotation of x y z in radians .
x
f32
y
f32
z
f32
x
f32
y
f32
z
f32