X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Flib%2Ffloat.qh;h=b35494de44c0334f776d296f808565dd33af8be8;hp=946319e4439ab110f0b46de4b2b9af8c119c6a8a;hb=991de5e6922cd3c283de56c3249624f0f1bfe767;hpb=78a337e337b8f08759b210146cdb8d2fd534e923 diff --git a/qcsrc/lib/float.qh b/qcsrc/lib/float.qh index 946319e44..b35494de4 100644 --- a/qcsrc/lib/float.qh +++ b/qcsrc/lib/float.qh @@ -1,3 +1,6 @@ #pragma once 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;