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