From 5207091d351df742bc50258b55803055706e8cd5 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Fri, 9 Jan 2004 04:37:19 +0000 Subject: [PATCH] Bug 118117. Fix bad constants. patch by tenthumbs, r=roc,sr=bz git-svn-id: svn://10.0.0.236/trunk@151068 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/ds/nsUnitConversion.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mozilla/xpcom/ds/nsUnitConversion.h b/mozilla/xpcom/ds/nsUnitConversion.h index 1a390653607..0ba7a7355f6 100644 --- a/mozilla/xpcom/ds/nsUnitConversion.h +++ b/mozilla/xpcom/ds/nsUnitConversion.h @@ -43,13 +43,13 @@ #include #ifndef FLT_EPSILON -// Not an ANSI compiler... oh, well. Make up something sane -#define FLT_EPSILON 1.0e-07f +// Not an ANSI compiler... oh, well. Use an IEEE value. +#define FLT_EPSILON 1.19209290e-7f #endif /// handy constants #define TWIPS_PER_POINT_INT 20 #define TWIPS_PER_POINT_FLOAT 20.0f -#define CEIL_CONST_FLOAT (1.0f - FLT_EPSILON) +#define CEIL_CONST_FLOAT (1.0f - 0.5f*FLT_EPSILON) #define ROUND_EXCLUSIVE_CONST_FLOAT (0.5f*CEIL_CONST_FLOAT) #define ROUND_CONST_FLOAT 0.5f