diff --git a/src/math/vector.cpp b/src/math/vector.cpp index ded2d7d..6566de2 100644 --- a/src/math/vector.cpp +++ b/src/math/vector.cpp @@ -41,7 +41,7 @@ float Vecf::distance(Vecf const &from, Vecf const &to) { } bool Vecf::equals_approximate(Vecf const &lhs, Vecf const &rhs) { - return std::fabs(lhs.x - rhs.x) < VECTOR_EPSILON && std::fabs(lhs.y - rhs.y) < VECTOR_EPSILON; + return lhs == rhs || (std::fabs(lhs.x - rhs.x) < VECTOR_EPSILON && std::fabs(lhs.y - rhs.y) < VECTOR_EPSILON); } float Vecf::dot(Vecf const &lhs, Vecf const &rhs) {