use std::ops::{Deref, DerefMut}; use simba::simd::SimdValue; use crate::base::coordinates::IJKW; use crate::Scalar; use crate::geometry::Quaternion; impl Deref for Quaternion { type Target = IJKW; #[inline] fn deref(&self) -> &Self::Target { unsafe { &*(self as *const Self as *const Self::Target) } } } impl DerefMut for Quaternion { #[inline] fn deref_mut(&mut self) -> &mut Self::Target { unsafe { &mut *(self as *mut Self as *mut Self::Target) } } }