Skip to content

Commit aeb7e7d

Browse files
madeehalordalcol
authored andcommitted
Fix deSign's NaN check
deSign() is using deIsNaN() to check for NaN which can cause exceptions. deIsNaN() in replaced with deDoubleIsIEEENaN() in deSign to avoid triggering exceptions. VK-GL-CTS issue: 5182 Components: Framework Change-Id: I98d76177afa01f195ee386e074dc506e574ca845
1 parent b71ba05 commit aeb7e7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

framework/delibs/debase/deMath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ float deFloatFractExp(float x, int *exponent);
251251

252252
DE_INLINE double deSign(double x)
253253
{
254-
return deIsNaN(x) ? x : (double)((x > 0.0) - (x < 0.0));
254+
return deDoubleIsIEEENaN(x) ? x : (double)((x > 0.0) - (x < 0.0));
255255
}
256256
DE_INLINE int deIntSign(double x)
257257
{

0 commit comments

Comments
 (0)