1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::datatypes::{self};

use super::Rotation3D;

impl Rotation3D {
    /// The identity rotation, i.e. no rotation at all.
    pub const IDENTITY: Self = Self(datatypes::Rotation3D::IDENTITY);
}

#[cfg(feature = "glam")]
impl From<Rotation3D> for glam::Quat {
    #[inline]
    fn from(val: Rotation3D) -> Self {
        val.0.into()
    }
}

#[cfg(feature = "mint")]
impl From<Rotation3D> for mint::Quaternion<f32> {
    #[inline]
    fn from(val: Rotation3D) -> Self {
        val.0.into()
    }
}