Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9110 in orxonox.OLD for trunk/src/lib/math/vector.h


Ignore:
Timestamp:
Jul 4, 2006, 11:18:41 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the Presentation back

File:
1 edited

Legend:

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

    r8894 r9110  
    2424#define __VECTOR_H_
    2525
    26 #include <math.h>
     26#include <cmath>
    2727#include "compiler.h"
    2828//! PI the circle-constant
     
    4242  Vector (float x, float y, float z) : x(x), y(y), z(z) {}  //!< assignment constructor
    4343  Vector () : x(0), y(0), z(0) {}
    44   ~Vector () {}
    4544
    4645  /** @param v: the Vecor to compare with this one @returns true, if the Vecors are the same, false otherwise */
     
    9089  void scale(const Vector& v) {   x *= v.x;  y *= v.y; z *= v.z; };
    9190  /** @returns the length of the vector */
    92   inline float len() const { return sqrt (x*x+y*y+z*z); }
     91  inline float len() const { return sqrt (x*x + y*y + z*z); }
    9392  /** normalizes the vector */
    9493  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; };
Note: See TracChangeset for help on using the changeset viewer.