This commit is contained in:
Mai M 2022-03-29 21:17:52 +02:00 committed by GitHub
commit ebc977ab91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -183,11 +183,11 @@ template <typename E>
[[nodiscard]] bool close_enough(const CVector2f& a, const CVector2f& b, float epsilon = FLT_EPSILON); [[nodiscard]] bool close_enough(const CVector2f& a, const CVector2f& b, float epsilon = FLT_EPSILON);
[[nodiscard]] inline bool close_enough(float a, float b, double epsilon = FLT_EPSILON) { [[nodiscard]] inline bool close_enough(float a, float b, double epsilon = DBL_EPSILON) {
return std::fabs(a - b) < epsilon; return std::fabs(a - b) < epsilon;
} }
[[nodiscard]] inline bool close_enough(double a, double b, double epsilon = FLT_EPSILON) { [[nodiscard]] inline bool close_enough(double a, double b, double epsilon = DBL_EPSILON) {
return std::fabs(a - b) < epsilon; return std::fabs(a - b) < epsilon;
} }
} // namespace zeus } // namespace zeus