pub fn from_euler(x: Rad<S>, y: Rad<S>, z: Rad<S>) -> Matrix3<S> {
        // http://en.wikipedia.org/wiki/Rotation_matrix#General_rotations
        let (sx, cx) = Rad::sin_cos(x);
        let (sy, cy) = Rad::sin_cos(y);
        let (sz, cz) = Rad::sin_cos(z);

        Matrix3::new(cy * cz, cy * sz, -sy,
                     -cx * sz + sx * sy * cz, cx * cz + sx * sy * sz, sx * cy,
                     sx * sz + cx * sy * cz, -sx * cz + cx * sy * sz, cx * cy)
    }
/// Create a rotation matrix from a set of euler angles.
///
/// # Parameters
///
/// - `x`: the angular rotation around the `x` axis (pitch).
/// - `y`: the angular rotation around the `y` axis (yaw).
/// - `z`: the angular rotation around the `z` axis (roll).
Create a rotation matrix from a set of euler angles.
Create a rotation matrix from a set of euler angles .
pub fn from_euler(x: Rad<S>, y: Rad<S>, z: Rad<S>) -> Matrix3<S> {
        // http://en.wikipedia.org/wiki/Rotation_matrix#General_rotations
        let (sx, cx) = Rad::sin_cos(x);
        let (sy, cy) = Rad::sin_cos(y);
        let (sz, cz) = Rad::sin_cos(z);
        Matrix3::new(cy * cz, cy * sz, -sy,
                     -cx * sz + sx * sy * cz, cx * cz + sx * sy * sz, sx * cy,
                     sx * sz + cx * sy * cz, -sx * cz + cx * sy * sz, cx * cy)
    }
pub fn from_euler ( x : Rad < S > , y : Rad < S > , z : Rad < S > ) -> Matrix3 < S > { // http://en.wikipedia.org/wiki/Rotation_matrix#General_rotations let ( sx , cx ) = Rad :: sin_cos ( x ) ; let ( sy , cy ) = Rad :: sin_cos ( y ) ; let ( sz , cz ) = Rad :: sin_cos ( z ) ; Matrix3 :: new ( cy * cz , cy * sz , - sy , - cx * sz + sx * sy * cz , cx * cz + sx * sy * sz , sx * cy , sx * sz + cx * sy * cz , - sx * cz + cx * sy * sz , cx * cy ) }
Create a rotation matrix from a set of euler angles.
Create a rotation matrix from a set of euler angles .
x
Rad<S>
y
Rad<S>
z
Rad<S>
x
Rad<S>
the angular rotation around the `x` axis (pitch).
the angular rotation around the ` x ` axis ( pitch ) .
y
Rad<S>
the angular rotation around the `y` axis (yaw).
the angular rotation around the ` y ` axis ( yaw ) .
z
Rad<S>
the angular rotation around the `z` axis (roll).
the angular rotation around the ` z ` axis ( roll ) .