- Timestamp:
- Aug 16, 2005, 10:32:46 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.h
r5008 r5052 27 27 ~Vector () {} 28 28 29 /** @param v: the Vecor to compare with this one @returns true, if the Vecors are the same, false otherwise */ 30 inline bool operator== (const Vector& v) const { return (this->x==v.x&&this->y==v.y&&this->z==v.z)?true:false; }; 29 31 /** @param index The index of the "array" @returns the x/y/z coordinate */ 30 32 inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; } … … 127 129 Quaternion (const Vector& dir, const Vector& up); 128 130 Quaternion (float roll, float pitch, float yaw); 131 132 /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */ 133 inline bool operator== (const Quaternion& q) const { return (unlikely(this->v==q.v&&this->w==q.w))?true:false; }; 129 134 /** @param f: a real value @return a Quaternion containing the quotient */ 130 135 inline Quaternion operator/ (const float& f) const { return (unlikely(f==0.0)) ? Quaternion() : Quaternion(this->v/f, this->w/f); };
Note: See TracChangeset
for help on using the changeset viewer.