I am trying to add a precondition that a
SIMD3<Float> be normalized.
What would be the best approach here?
I could try:
(1 - length(vector)).isZero
But I think this will be problematic if there is any amount of floating point error. I could also check isAlmostZero with some amount of tolerance, which would probably be acceptable. Should I just pull in SwiftNumerics and check approximate equality of the length with one?