1
0
Fork 0

Changed Vector3 Equals function to avoid using memcmp

This commit is contained in:
Woazboat 2015-04-28 02:54:45 +02:00
parent 8a50918d2a
commit 689fe6041c
1 changed files with 1 additions and 5 deletions

View File

@ -126,11 +126,7 @@ public:
{
// Perform a bitwise comparison of the contents - we want to know whether this object is exactly equal
// To perform EPS-based comparison, use the EqualsEps() function
return (
(memcmp(&x, &a_Rhs.x, sizeof(x)) == 0) &&
(memcmp(&y, &a_Rhs.y, sizeof(y)) == 0) &&
(memcmp(&z, &a_Rhs.z, sizeof(z)) == 0)
);
return !((x != a_Rhs.x) || (y != a_Rhs.y) || (z != a_Rhs.z));
}
inline bool EqualsEps(const Vector3<T> & a_Rhs, T a_Eps) const