nalgebra
nalgebra copied to clipboard
Implement `cast` for `Unit<Vector<T, D, S>>`
Currently, cast
is resolved via Unit
's Deref
impl, which leads to it confusingly stripping the Unit
from UnitVector
s. Add an inherent impl which takes precedence, similar to the existing specialization for UnitQuaternion
.
Wasn't entirely sure where to put the definition, hope it makes sense where it is.