r4699 - trunk/data/qcsrc/common
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Oct 10 08:39:34 EDT 2008
Author: div0
Date: 2008-10-10 08:39:34 -0400 (Fri, 10 Oct 2008)
New Revision: 4699
Modified:
trunk/data/qcsrc/common/util.qc
Log:
fix float logic for almost_in_bounds
Modified: trunk/data/qcsrc/common/util.qc
===================================================================
--- trunk/data/qcsrc/common/util.qc 2008-10-10 09:18:35 UTC (rev 4698)
+++ trunk/data/qcsrc/common/util.qc 2008-10-10 12:39:34 UTC (rev 4699)
@@ -893,5 +893,7 @@
float almost_in_bounds(float a, float b, float c)
{
- return almost_equals(b, median(a, b, c));
+ float eps;
+ eps = (max(a, -a) + max(c, -c)) * 0.001;
+ return b == median(a - eps, b, c + eps);
}
More information about the nexuiz-commits
mailing list