KiROUND: make sure input type is floating point before checking for nan.
This commit is contained in:
parent
f99505e190
commit
4c630e5aec
|
@ -102,12 +102,15 @@ constexpr ret_type KiROUND( fp_type v )
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if( std::isnan( v ) )
|
else if constexpr( std::is_floating_point_v<fp_type> )
|
||||||
|
{
|
||||||
|
if( std::isnan( v ) )
|
||||||
{
|
{
|
||||||
kimathLogOverflow( double( v ), typeid( ret_type ).name() );
|
kimathLogOverflow( double( v ), typeid( ret_type ).name() );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret_type( max_ret( ret ) );
|
return ret_type( max_ret( ret ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue