X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Flib%2Ffloat.qh;fp=qcsrc%2Flib%2Ffloat.qh;h=b35494de44c0334f776d296f808565dd33af8be8;hb=8e4957c252f8381e37f2a72e227797bf51e5cc2f;hp=b4d1f0bd768c785f103ad3886f5453769e10c2ff;hpb=b2713fd3191f8588b87d025408974d0d8293b385;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/float.qh b/qcsrc/lib/float.qh index b4d1f0bd7..b35494de4 100644 --- a/qcsrc/lib/float.qh +++ b/qcsrc/lib/float.qh @@ -2,3 +2,5 @@ const float FLOAT_MAX = 340282346638528859811704183484516925440.0f; const float FLOAT_EPSILON = 0.00000011920928955078125f; +/// Always use `isnan` function to compare because `float x = FLOAT_NAN; x == x;` gives true +const float FLOAT_NAN = 0.0 / 0.0;