Optimized Vector <= comparison
Former-commit-id: 8668b8ff78387262f0e21f038b6ca0240c513476
This commit is contained in:
@@ -426,7 +426,10 @@ bool NzVector2<T>::operator<(const NzVector2& vec) const
|
||||
template<typename T>
|
||||
bool NzVector2<T>::operator<=(const NzVector2& vec) const
|
||||
{
|
||||
return operator<(vec) || operator==(vec);
|
||||
if (x == vec.x)
|
||||
return y <= vec.y;
|
||||
else
|
||||
return x < vec.x;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user