Changeset 4609 in orxonox.OLD for orxonox/trunk/src/lib/math
- Timestamp:
- Jun 12, 2005, 11:37:57 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.h
r4585 r4609 31 31 /** \param v The vector to add \returns the addition between two vectors (this + v) */ 32 32 inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); }; 33 /** \param v The vector to add \returns the addition between two vectors (this + v) */ 34 inline Vector operator+ (const sVec3D& v) const { return Vector(x + v[0], y + v[1], z + v[2]); }; 33 35 /** \param v The vector to add \returns the addition between two vectors (this += v) */ 34 36 inline const Vector& operator+= (const Vector& v) { this->x += v.x; this->y += v.y; this->z += v.z; return *this; }; 35 37 /** \param v The vector to substract \returns the substraction between two vectors (this - v) */ 38 inline const Vector& operator+= (const sVec3D& v) { this->x += v[0]; this->y += v[1]; this->z += v[2]; return *this; }; 39 /** \param v The vector to substract \returns the substraction between two vectors (this - v) */ 36 40 inline Vector operator- (const Vector& v) const { return Vector(x - v.x, y - v.y, z - v.z); } 41 /** \param v The vector to substract \returns the substraction between two vectors (this - v) */ 42 inline Vector operator- (const sVec3D& v) const { return Vector(x - v[0], y - v[1], z - v[2]); } 37 43 /** \param v The vector to substract \returns the substraction between two vectors (this -= v) */ 38 44 inline const Vector& operator-= (const Vector& v) { this->x -= v.x; this->y -= v.y; this->z -= v.z; return *this; }; 45 /** \param v The vector to substract \returns the substraction between two vectors (this -= v) */ 46 inline const Vector& operator-= (const sVec3D& v) { this->x -= v[0]; this->y -= v[1]; this->z -= v[2]; return *this; }; 39 47 /** \param v the second vector \returns The dotProduct between two vector (this (dot) v) */ 40 48 inline float operator* (const Vector& v) const { return x * v.x + y * v.y + z * v.z; };
Note: See TracChangeset
for help on using the changeset viewer.