mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-02 00:00:26 +02:00
Make equals method symmetric
This commit is contained in:
@ -111,11 +111,10 @@ public:
|
||||
//! Checks if this vector equals the other one.
|
||||
/** Takes floating point rounding errors into account.
|
||||
\param other Vector to compare with.
|
||||
\param tolerance Epsilon value for both - comparing X and Y.
|
||||
\return True if the two vector are (almost) equal, else false. */
|
||||
bool equals(const vector2d<T>& other, const T tolerance = (T)ROUNDING_ERROR_f32 ) const
|
||||
bool equals(const vector2d<T>& other) const
|
||||
{
|
||||
return core::equals(X, other.X, tolerance) && core::equals(Y, other.Y, tolerance);
|
||||
return core::equals(X, other.X) && core::equals(Y, other.Y);
|
||||
}
|
||||
|
||||
vector2d<T>& set(T nx, T ny) {X=nx; Y=ny; return *this; }
|
||||
|
Reference in New Issue
Block a user