Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9092 in orxonox.OLD for branches/presentation/src/lib/math/vector.h


Ignore:
Timestamp:
Jul 4, 2006, 2:38:00 AM (18 years ago)
Author:
bensch
Message:

cmath (valgrinded)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/math/vector.h

    r9090 r9092  
    2424#define __VECTOR_H_
    2525
    26 #include <math.h>
     26#include <cmath>
    2727#include "compiler.h"
    2828//! PI the circle-constant
     
    8989  void scale(const Vector& v) {   x *= v.x;  y *= v.y; z *= v.z; };
    9090  /** @returns the length of the vector */
    91   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); }
    9292  /** normalizes the vector */
    9393  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.