]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
optimize isnan()
authorRudolf Polzer <divverent@alientrap.org>
Mon, 24 Jan 2011 06:44:54 +0000 (07:44 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 24 Jan 2011 06:44:54 +0000 (07:44 +0100)
qcsrc/warpzonelib/mathlib.qc

index b460a063dbe04c13460e6e2fc6d19f72827285b6..42262102e50b16421ae0a80003ba817bf8c34b58 100644 (file)
@@ -18,7 +18,9 @@ int isinf(float x)
 }
 int isnan(float x)
 {
-       return !(x + x == x + x);
+       float y;
+       y = x;
+       return (x != y);
 }
 int isnormal(float x)
 {