Update Vector2.cpp
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m17s
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 28s

change == and != to not check epsilon. ~= should check epsilon.
This commit is contained in:
2025-01-27 02:42:42 -05:00
parent 58bd078b05
commit 245c6c6eb4

View File

@@ -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