Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5053 in orxonox.OLD for orxonox/trunk/src/lib/math


Ignore:
Timestamp:
Aug 16, 2005, 11:28:13 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: loadModel in Projectiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.h

    r5052 r5053  
    7272  inline float len() const { return sqrt (x*x+y*y+z*z); }
    7373  /** normalizes the vector */
    74   inline void normalize() {
    75                       float l = len();
    76                       if( unlikely(l == 0.0))
    77                         {
    78                           // Prevent divide by zero
    79                           return;
    80                         }
    81                       x = x / l;
    82                       y = y / l;
    83                       z = z / l;
    84                     }
     74  inline void normalize() { float l = len(); if( unlikely(l == 0.0))return; this->x=this->x/l; this->y=this->y/l; this->z=this->z/l; };
    8575  Vector getNormalized() const;
    8676  Vector abs();
Note: See TracChangeset for help on using the changeset viewer.