8160934: isnan() is not available on older MSVC compilers

Reviewed-by: prr, mschoene
This commit is contained in:
Alexey Ivanov 2016-07-12 11:17:30 +03:00
parent b9fce9f80b
commit b846afbe35

View File

@ -244,7 +244,7 @@ void LinLerp1D(register const cmsUInt16Number Value[],
// To prevent out of bounds indexing // To prevent out of bounds indexing
cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v) cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v)
{ {
return v < 0.0f || isnan(v) ? 0.0f : (v > 1.0f ? 1.0f : v); return v < 0.0f || v != v ? 0.0f : (v > 1.0f ? 1.0f : v);
} }
// Floating-point version of 1D interpolation // Floating-point version of 1D interpolation