Gilles's patch to get rid of the the same identifier warnings

Kent
--
mein@cs.umn.edu
This commit is contained in:
2002-12-14 15:38:45 +00:00
parent cfceb16f4a
commit 4a9377a861
11 changed files with 48 additions and 48 deletions

View File

@@ -1,12 +1,12 @@
#include "MT_Optimize.h"
GEN_INLINE MT_Vector2& MT_Vector2::operator+=(const MT_Vector2& v) {
m_co[0] += v[0]; m_co[1] += v[1];
GEN_INLINE MT_Vector2& MT_Vector2::operator+=(const MT_Vector2& vv) {
m_co[0] += vv[0]; m_co[1] += vv[1];
return *this;
}
GEN_INLINE MT_Vector2& MT_Vector2::operator-=(const MT_Vector2& v) {
m_co[0] -= v[0]; m_co[1] -= v[1];
GEN_INLINE MT_Vector2& MT_Vector2::operator-=(const MT_Vector2& vv) {
m_co[0] -= vv[0]; m_co[1] -= vv[1];
return *this;
}
@@ -43,8 +43,8 @@ GEN_INLINE MT_Vector2 operator/(const MT_Vector2& v, MT_Scalar s) {
return v * (1.0 / s);
}
GEN_INLINE MT_Scalar MT_Vector2::dot(const MT_Vector2& v) const {
return m_co[0] * v[0] + m_co[1] * v[1];
GEN_INLINE MT_Scalar MT_Vector2::dot(const MT_Vector2& vv) const {
return m_co[0] * vv[0] + m_co[1] * vv[1];
}
GEN_INLINE MT_Scalar MT_Vector2::length2() const { return dot(*this); }
@@ -59,18 +59,18 @@ GEN_INLINE bool MT_Vector2::fuzzyZero() const { return MT_fuzzyZero2(length2());
GEN_INLINE void MT_Vector2::normalize() { *this /= length(); }
GEN_INLINE MT_Vector2 MT_Vector2::normalized() const { return *this / length(); }
GEN_INLINE void MT_Vector2::scale(MT_Scalar x, MT_Scalar y) {
m_co[0] *= x; m_co[1] *= y;
GEN_INLINE void MT_Vector2::scale(MT_Scalar xx, MT_Scalar yy) {
m_co[0] *= xx; m_co[1] *= yy;
}
GEN_INLINE MT_Vector2 MT_Vector2::scaled(MT_Scalar x, MT_Scalar y) const {
return MT_Vector2(m_co[0] * x, m_co[1] * y);
GEN_INLINE MT_Vector2 MT_Vector2::scaled(MT_Scalar xx, MT_Scalar yy) const {
return MT_Vector2(m_co[0] * xx, m_co[1] * yy);
}
GEN_INLINE MT_Scalar MT_Vector2::angle(const MT_Vector2& v) const {
MT_Scalar s = sqrt(length2() * v.length2());
GEN_INLINE MT_Scalar MT_Vector2::angle(const MT_Vector2& vv) const {
MT_Scalar s = sqrt(length2() * vv.length2());
MT_assert(!MT_fuzzyZero(s));
return acos(dot(v) / s);
return acos(dot(vv) / s);
}