pub fn polar_decomposition(&self) -> (N, N, Unit<Vector3<N>>) {
        let default_axis = Unit::from_unit_value_unchecked(Vector3::y());

        if let Some((q, n)) = Unit::try_new_and_get(*self, ::zero()) {
            if let Some(axis) = Unit::try_new(self.vector(), ::zero()) {
                let angle = q.angle() / ::cast(2.0);

                (n, angle, axis)
            }
            else {
                (n, ::zero(), default_axis)
            }
        }
        else {
            (::zero(), ::zero(), default_axis)
        }
    }
/// The polar decomposition of this quaternion.
///
/// Returns, from left to right: the quaternion norm, the half rotation angle, the rotation
/// axis. If the rotation angle is zero, the rotation axis is set to the `y` axis.
The polar decomposition of this quaternion.
Returns, from left to right: the quaternion norm, the half rotation angle, the rotation
axis. If the rotation angle is zero, the rotation axis is set to the `y` axis.
The polar decomposition of this quaternion . Returns from left to right : the quaternion norm the half rotation angle the rotation axis . If the rotation angle is zero the rotation axis is set to the ` y ` axis .
pub fn polar_decomposition(&self) -> (N, N, Unit<Vector3<N>>) {
        let default_axis = Unit::from_unit_value_unchecked(Vector3::y());
        if let Some((q, n)) = Unit::try_new_and_get(*self, ::zero()) {
            if let Some(axis) = Unit::try_new(self.vector(), ::zero()) {
                let angle = q.angle() / ::cast(2.0);
                (n, angle, axis)
            }
            else {
                (n, ::zero(), default_axis)
            }
        }
        else {
            (::zero(), ::zero(), default_axis)
        }
    }
pub fn polar_decomposition ( & self ) -> ( N , N , Unit < Vector3 < N > > ) { let default_axis = Unit :: from_unit_value_unchecked ( Vector3 :: y ( ) ) ; if let Some ( ( q , n ) ) = Unit :: try_new_and_get ( * self , :: zero ( ) ) { if let Some ( axis ) = Unit :: try_new ( self . vector ( ) , :: zero ( ) ) { let angle = q . angle ( ) / :: cast ( 2.0 ) ; ( n , angle , axis ) } else { ( n , :: zero ( ) , default_axis ) } } else { ( :: zero ( ) , :: zero ( ) , default_axis ) } }
The polar decomposition of this quaternion.
The polar decomposition of this quaternion .
&self
&self