Update Vector2.cpp
change == and != to not check epsilon. ~= should check epsilon.
This commit is contained in:
@@ -37,12 +37,12 @@ namespace J3ML::LinearAlgebra {
|
||||
|
||||
bool Vector2::operator==(const Vector2& rhs) const
|
||||
{
|
||||
return this->IsWithinMarginOfError(rhs);
|
||||
return x == rhs.x && y == rhs.y;
|
||||
}
|
||||
|
||||
bool Vector2::operator!=(const Vector2& rhs) const
|
||||
{
|
||||
return this->IsWithinMarginOfError(rhs) == false;
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
Vector2 Vector2::Min(const Vector2& min) const
|
||||
|
Reference in New Issue
Block a user