[Bf-committers] Normalise patch
Nathan Vegdahl
cessen at cessen.com
Thu Feb 9 15:37:45 CET 2006
> With that change, instead of having to check if the
> result of the normalise is a null vector, we'd have to
> check beforehand to see if it's lower than a certain
> threshold (since the rest of the operations on that
> vector will be on a magic value, hence, wrong).
Actually, it's still very quick and easy to check. No before-hand
annoyances or thresholds involved. It's even *easier* than checking if
the resulting vector is null, as you suggested. In fact, the way you
check it is *exactly* the same as you would have before my modification
(or at least should have):
The Normalise function returns a floating point number. If it's
zero, then the vector wasn't properly normalised.
Simple, huh?
--Nathan "Cessen" Vegdahl
More information about the Bf-committers
mailing list