diff --git a/utilities/utilities.h b/utilities/utilities.h index 11340874..b506678e 100644 --- a/utilities/utilities.h +++ b/utilities/utilities.h @@ -243,17 +243,12 @@ template inline void SafeDeleteArray(T *&Pointer) Pointer = nullptr; } -template Type_ is_equal(Type_ const &Left, Type_ const &Right, Type_ const Epsilon = 1e-5) +template bool is_equal(T const &Left, T const &Right, T const Epsilon = T(1e-5)) { - - if (Epsilon != 0) - { + if (Epsilon != T(0)) return glm::epsilonEqual(Left, Right, Epsilon); - } - else - { - return (Left == Right); - } + + return (Left == Right); } template Type_ clamp(Type_ const Value, Type_ const Min, Type_ const Max)