nalgebra icon indicating copy to clipboard operation
nalgebra copied to clipboard

Implement `cast` for `Unit<Vector<T, D, S>>`

Open Ralith opened this issue 2 years ago • 0 comments

Currently, cast is resolved via Unit's Deref impl, which leads to it confusingly stripping the Unit from UnitVectors. 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.

Ralith avatar Jun 11 '22 18:06 Ralith