зеркало из https://github.com/mozilla/pjs.git
Don't use precision so high it gets rounded in a way we don't want. Bug
118117, r+sr=roc
This commit is contained in:
Родитель
a9d415efad
Коммит
23de100a7a
|
@ -40,13 +40,18 @@
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include "nsCoord.h"
|
#include "nsCoord.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
|
#ifndef FLT_EPSILON
|
||||||
|
// Not an ANSI compiler... oh, well. Make up something sane
|
||||||
|
#define FLT_EPSILON 1.0e-07f
|
||||||
|
#endif
|
||||||
/// handy constants
|
/// handy constants
|
||||||
#define TWIPS_PER_POINT_INT 20
|
#define TWIPS_PER_POINT_INT 20
|
||||||
#define TWIPS_PER_POINT_FLOAT 20.0f
|
#define TWIPS_PER_POINT_FLOAT 20.0f
|
||||||
#define ROUND_EXCLUSIVE_CONST_FLOAT 0.4999999999999999f // XXX this should be derived from platform FLOAT_MIN
|
#define CEIL_CONST_FLOAT (1.0f - FLT_EPSILON)
|
||||||
|
#define ROUND_EXCLUSIVE_CONST_FLOAT (0.5f*CEIL_CONST_FLOAT)
|
||||||
#define ROUND_CONST_FLOAT 0.5f
|
#define ROUND_CONST_FLOAT 0.5f
|
||||||
#define CEIL_CONST_FLOAT 0.9999999999999999f // XXX this should be derived from platform FLOAT_MIN
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче