diff --git a/libs/main/math/pimathcomplex.h b/libs/main/math/pimathcomplex.h index 46d75e6b..268e7daf 100644 --- a/libs/main/math/pimathcomplex.h +++ b/libs/main/math/pimathcomplex.h @@ -119,10 +119,10 @@ inline PIVector2D abs(const PIVector2D & v) { /** -* @brief Inline funtion of compare with zero different types +* @brief floating point number specific comparison between value passed as parameter and zero * -* @param v is input parameter of type T -* @return true if zero, false if not zero +* @param v floating point parameter for comparison +* @return true if v in locality of zero, otherwise false */ template::value, int>::type = 0> inline bool PIMathFloatNullCompare(const T v) { @@ -131,15 +131,15 @@ inline bool PIMathFloatNullCompare(const T v) { } /** -* @brief Inline funtion of compare with zero colmplexf type +* @brief floating point number specific comparison between parameter value and zero. * -* @param v is input parameter of type colmplexf -* @return true if zero, false if not zero +* @param v complex with floating point real and imag parts +* @return true if absolute of v in locality of zero, otherwise false */ template::value || - std::is_floating_point::value - , int>::type = 0> + std::is_floating_point::value && + std::is_floating_point::value + , int>::type = 0> inline bool PIMathFloatNullCompare(const T v) { static_assert(std::is_floating_point::value, "Type must be floating point"); static_assert(std::is_floating_point::value, "Type must be floating point");