Changeset 4966 in orxonox.OLD for orxonox/trunk/src/lib/math/vector.h
- Timestamp:
- Jul 28, 2005, 5:53:15 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.h
r4897 r4966 54 54 inline const Vector& operator*= (float f) { this->x *= f; this->y *= f; this->z *= f; return *this; }; 55 55 /** @param f a factor to divide the vector with @returns the vector divided by f (this / f) */ 56 inline Vector operator/ (float f) const { if (unlikely(f == 0.0)) return Vector(0,0,0); else returnVector(this->x / f, this->y / f, this->z / f); };56 inline Vector operator/ (float f) const {return (unlikely(f == 0.0))?Vector(0,0,0):Vector(this->x / f, this->y / f, this->z / f); }; 57 57 /** @param f a factor to divide the vector with @returns the vector divided by f (this /= f) */ 58 58 inline const Vector& operator/= (float f) {if (unlikely(f == 0.0)) {this->x=0;this->y=0;this->z=0;} else {this->x /= f; this->y /= f; this->z /= f;} return *this; };
Note: See TracChangeset
for help on using the changeset viewer.