--- trunk/src/math/Vector.hpp 2004/10/18 23:13:23 101 +++ trunk/src/math/Vector.hpp 2004/10/19 04:34:35 104 @@ -285,7 +285,7 @@ namespace oopse { * @return the length of this vector */ inline double length() { - return sqrt(lengthSquared()); + return sqrt(lengthSquare()); } /** @@ -301,6 +301,10 @@ namespace oopse { double len; len = length(); + + //if (len < oopse:epsilon) + // throw(); + *this /= len; } @@ -308,9 +312,8 @@ namespace oopse { * Tests if this vector is normalized * @return true if this vector is normalized, otherwise return false */ - inline bool isNormalized() const - { - return lengthSquare() == 1.0; + inline bool isNormalized() { + return equal(lengthSquare(), 1.0); } protected: @@ -392,13 +395,6 @@ namespace oopse { return result; } - /** fuzzy comparson */ - template - inline bool epsilonEqual( const Vector& v1, const Vector& v2 ) { - - } - - /** * Returns the dot product of two Vectors * @param v1 first vector