pub fn from_quaternion(x: T, y: T, z: T, w: T) -> Mat3<T> {
        let one = T::ONE;
        let two = one + one;

        Mat3 {
            a11: one - two*y*y - two*z*z,
            a12: two*x*y - two*z*w,
            a13: two*x*z + two*y*w,
            a21: two*x*y + two*w*z,
            a22: one - two*x*x - two*z*z,
            a23: two*y*z - two*w*x,
            a31: two*x*z - two*w*y,
            a32: two*y*z + two*w*x,
            a33: one - two*x*x - two*y*y,
        }
    }
/// Converts the given quaterion to a matrix.
Converts the given quaterion to a matrix.
Converts the given quaterion to a matrix .
pub fn from_quaternion(x: T, y: T, z: T, w: T) -> Mat3<T> {
        let one = T::ONE;
        let two = one + one;
        Mat3 {
            a11: one - two*y*y - two*z*z,
            a12: two*x*y - two*z*w,
            a13: two*x*z + two*y*w,
            a21: two*x*y + two*w*z,
            a22: one - two*x*x - two*z*z,
            a23: two*y*z - two*w*x,
            a31: two*x*z - two*w*y,
            a32: two*y*z + two*w*x,
            a33: one - two*x*x - two*y*y,
        }
    }
pub fn from_quaternion ( x : T , y : T , z : T , w : T ) -> Mat3 < T > { let one = T :: ONE ; let two = one + one ; Mat3 { a11 : one - two * y * y - two * z * z , a12 : two * x * y - two * z * w , a13 : two * x * z + two * y * w , a21 : two * x * y + two * w * z , a22 : one - two * x * x - two * z * z , a23 : two * y * z - two * w * x , a31 : two * x * z - two * w * y , a32 : two * y * z + two * w * x , a33 : one - two * x * x - two * y * y , } }
Converts the given quaterion to a matrix.
Converts the given quaterion to a matrix .
x
T
y
T
z
T
w
T
x
T
y
T
z
T
w
T