Changeset 8894 in orxonox.OLD for trunk/src/lib/math
- Timestamp:
- Jun 29, 2006, 12:19:48 AM (18 years ago)
- Location:
- trunk/src/lib/math
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/math/quaternion.h
r8802 r8894 51 51 inline bool operator== (const Quaternion& q) const { return (unlikely(this->v==q.v&&this->w==q.w))?true:false; }; 52 52 /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */ 53 inline bool operator!= (const Quaternion& q) const { return (unlikely(this->v!=q.v &&this->w!=q.w))?true:false; };53 inline bool operator!= (const Quaternion& q) const { return (unlikely(this->v!=q.v||this->w!=q.w))?true:false; }; 54 54 /** @param f: a real value @return a Quaternion containing the quotient */ 55 55 inline Quaternion operator/ (const float& f) const { return (unlikely(f==0.0)) ? Quaternion() : Quaternion(this->v/f, this->w/f); }; -
trunk/src/lib/math/vector.h
r8490 r8894 47 47 inline bool operator== (const Vector& v) const { return (this->x==v.x&&this->y==v.y&&this->z==v.z)?true:false; }; 48 48 /** @param v: the Vecor to compare with this one @returns true, if the Vecors are different, false otherwise */ 49 inline bool operator!= (const Vector& v) const { return (this->x!=v.x &&this->y!=v.y&&this->z!=v.z)?true:false; };49 inline bool operator!= (const Vector& v) const { return (this->x!=v.x||this->y!=v.y||this->z!=v.z)?true:false; }; 50 50 /** @param index The index of the "array" @returns the x/y/z coordinate */ 51 51 inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; }
Note: See TracChangeset
for help on using the changeset viewer.