diff --git a/src/Magnum/Math/TypeTraits.h b/src/Magnum/Math/TypeTraits.h index e34883318..ed74eb150 100644 --- a/src/Magnum/Math/TypeTraits.h +++ b/src/Magnum/Math/TypeTraits.h @@ -133,7 +133,8 @@ template struct TypeTraits: Implementation::TypeTraitsDefault { * @brief Fuzzy compare * * Uses fuzzy compare for floating-point types (using @ref epsilon() - * value), pure equality comparison everywhere else. + * value), pure equality comparison everywhere else. Algorithm adapted from + * http://floating-point-gui.de/errors/comparison/. */ static bool equals(T a, T b); @@ -222,7 +223,6 @@ template struct TypeTraitsFloatingPoint: TypeTraitsName { static bool equalsZero(T a, T epsilon); }; -/* Adapted from http://floating-point-gui.de/errors/comparison/ */ template bool TypeTraitsFloatingPoint::equals(const T a, const T b) { /* Shortcut for binary equality (also infinites) */ if(a == b) return true;