Coerce default epsilon values to Type

This commit is contained in:
Julian Kent
2021-01-13 10:17:09 +01:00
committed by Julian Kent
parent 054f8b12f4
commit d540ca5de2
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ bool is_finite(Type x) {
* @return true if the two values are considered equal, false otherwise
*/
template<typename Type>
bool isEqualF(const Type x, const Type y, const Type eps = 1e-4f)
bool isEqualF(const Type x, const Type y, const Type eps = Type(1e-4f))
{
return (matrix::fabs(x - y) <= eps)
|| (isnan(x) && isnan(y))