pub fn create_rotation(x: T, y: T, z: T, theta: Radians<T>) -> TypedMatrix4D<T, Src, Dst> {
        let (_0, _1): (T, T) = (Zero::zero(), One::one());
        let _2 = _1 + _1;

        let xx = x * x;
        let yy = y * y;
        let zz = z * z;

        let half_theta = theta.get() / _2;
        let sc = half_theta.sin() * half_theta.cos();
        let sq = half_theta.sin() * half_theta.sin();

        TypedMatrix4D::row_major(
            _1 - _2 * (yy + zz) * sq,
            _2 * (x * y * sq - z * sc),
            _2 * (x * z * sq + y * sc),
            _0,

            _2 * (x * y * sq + z * sc),
            _1 - _2 * (xx + zz) * sq,
            _2 * (y * z * sq - x * sc),
            _0,

            _2 * (x * z * sq - y * sc),
            _2 * (y * z * sq + x * sc),
            _1 - _2 * (xx + yy) * sq,
            _0,

            _0,
            _0,
            _0,
            _1
        )
    }
/// Create a 3d rotation matrix from an angle / axis.
/// The supplied axis must be normalized.
Create a 3d rotation matrix from an angle / axis.
The supplied axis must be normalized.
Create a 3d rotation matrix from an angle / axis . The supplied axis must be normalized .
pub fn create_rotation(x: T, y: T, z: T, theta: Radians<T>) -> TypedMatrix4D<T, Src, Dst> {
        let (_0, _1): (T, T) = (Zero::zero(), One::one());
        let _2 = _1 + _1;
        let xx = x * x;
        let yy = y * y;
        let zz = z * z;
        let half_theta = theta.get() / _2;
        let sc = half_theta.sin() * half_theta.cos();
        let sq = half_theta.sin() * half_theta.sin();
        TypedMatrix4D::row_major(
            _1 - _2 * (yy + zz) * sq,
            _2 * (x * y * sq - z * sc),
            _2 * (x * z * sq + y * sc),
            _0,
            _2 * (x * y * sq + z * sc),
            _1 - _2 * (xx + zz) * sq,
            _2 * (y * z * sq - x * sc),
            _0,
            _2 * (x * z * sq - y * sc),
            _2 * (y * z * sq + x * sc),
            _1 - _2 * (xx + yy) * sq,
            _0,
            _0,
            _0,
            _0,
            _1
        )
    }
pub fn create_rotation ( x : T , y : T , z : T , theta : Radians < T > ) -> TypedMatrix4D < T , Src , Dst > { let ( _0 , _1 ) : ( T , T ) = ( Zero :: zero ( ) , One :: one ( ) ) ; let _2 = _1 + _1 ; let xx = x * x ; let yy = y * y ; let zz = z * z ; let half_theta = theta . get ( ) / _2 ; let sc = half_theta . sin ( ) * half_theta . cos ( ) ; let sq = half_theta . sin ( ) * half_theta . sin ( ) ; TypedMatrix4D :: row_major ( _1 - _2 * ( yy + zz ) * sq , _2 * ( x * y * sq - z * sc ) , _2 * ( x * z * sq + y * sc ) , _0 , _2 * ( x * y * sq + z * sc ) , _1 - _2 * ( xx + zz ) * sq , _2 * ( y * z * sq - x * sc ) , _0 , _2 * ( x * z * sq - y * sc ) , _2 * ( y * z * sq + x * sc ) , _1 - _2 * ( xx + yy ) * sq , _0 , _0 , _0 , _0 , _1 ) }
Create a 3d rotation matrix from an angle / axis.
Create a 3d rotation matrix from an angle / axis .
x
T
y
T
z
T
theta
Radians<T>
x
T
y
T
z
T
theta
Radians<T>