Fixed Vector3::operator[==|<=]

Thanks to OveRdrivR

Former-commit-id: fa93eb7124e3b322407d1488c8530312c2019792
This commit is contained in:
Lynix 2013-09-30 23:19:38 +02:00
parent 14a939d785
commit 0520de7ab0
1 changed files with 4 additions and 4 deletions

View File

@ -488,8 +488,8 @@ template<typename T>
bool NzVector3<T>::operator==(const NzVector3& vec) const
{
return NzNumberEquals(x, vec.x) &&
NzNumberEquals(y, vec.y) &&
NzNumberEquals(z, vec.z);
NzNumberEquals(y, vec.y) &&
NzNumberEquals(z, vec.z);
}
template<typename T>
@ -503,7 +503,7 @@ bool NzVector3<T>::operator<(const NzVector3& vec) const
{
if (x == vec.x)
{
if (y < vec.y)
if (y == vec.y)
return z < vec.z;
else
return y < vec.y;
@ -517,7 +517,7 @@ bool NzVector3<T>::operator<=(const NzVector3& vec) const
{
if (x == vec.x)
{
if (y < vec.y)
if (y == vec.y)
return z <= vec.z;
else
return y < vec.y;