ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/math/Vector.hpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/math/Vector.hpp (file contents):
Revision 1594 by tim, Mon Oct 18 23:13:23 2004 UTC vs.
Revision 1597 by tim, Tue Oct 19 04:34:35 2004 UTC

# Line 285 | Line 285 | namespace oopse {
285               * @return the length of this vector
286               */
287               inline double length() {
288 <                return sqrt(lengthSquared());  
288 >                return sqrt(lengthSquare());  
289              }
290              
291              /**
# Line 301 | Line 301 | namespace oopse {
301                  double len;
302  
303                  len = length();
304 +                
305 +                //if (len < oopse:epsilon)
306 +                //  throw();
307 +                
308                  *this /= len;
309              }
310  
# Line 308 | Line 312 | namespace oopse {
312               * Tests if this vector is normalized
313               * @return true if this vector is normalized, otherwise return false
314               */
315 <            inline bool isNormalized() const
316 <            {
313 <                return lengthSquare() == 1.0;
315 >            inline bool isNormalized() {
316 >                return equal(lengthSquare(), 1.0);
317              }          
318              
319          protected:
# Line 392 | Line 395 | namespace oopse {
395          return result;          
396      }
397      
395    /** fuzzy comparson */
396    template<typename Real, unsigned int Dim>        
397    inline bool epsilonEqual( const Vector<Real, Dim>& v1, const Vector<Real, Dim>& v2 ) {
398
399    }
400
401    
398      /**
399       * Returns the dot product of two Vectors
400       * @param v1 first vector

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines