|
static double | clampEpsilon (final double x, final double min, final double max) |
|
static boolean | isEqualHybrid (final double x, final double y) |
|
static boolean | isEqualAbs (final double x, final double y) |
|
static boolean | isEqualRel (final double x, final double y) |
|
static boolean | isZero (final double x) |
|
static boolean | isZeroSq (final double x) |
|
static int | compareHybrid (final double x, final double y) |
|
static int | compareAbs (final double x, final double y) |
|
static int | compareRel (final double x, final double y) |
|
WB_Epsilon contains functions for tolerance based floating point calculations.
- Author
- Frederik Vanhoutte, W:Blut
static double wblut.math.WB_Epsilon.clampEpsilon |
( |
final double |
x, |
|
|
final double |
min, |
|
|
final double |
max |
|
) |
| |
|
static |
Clamp value to range with error margin.
- Parameters
-
- Returns
- clamped value
static int wblut.math.WB_Epsilon.compareAbs |
( |
final double |
x, |
|
|
final double |
y |
|
) |
| |
|
static |
Compare with error margin using isEqualAbs.
- Parameters
-
- Returns
- 0 if equal, -1 if x<y, +1 if x>1
static int wblut.math.WB_Epsilon.compareHybrid |
( |
final double |
x, |
|
|
final double |
y |
|
) |
| |
|
static |
Compare with error margin using isEqualHybrid.
- Parameters
-
- Returns
- 0 if equal, -1 if x<y, +1 if x>1
static int wblut.math.WB_Epsilon.compareRel |
( |
final double |
x, |
|
|
final double |
y |
|
) |
| |
|
static |
Compare with error margin using isEqualRel.
- Parameters
-
- Returns
- 0 if equal, -1 if x<y, +1 if x>1
static boolean wblut.math.WB_Epsilon.isEqualAbs |
( |
final double |
x, |
|
|
final double |
y |
|
) |
| |
|
static |
Equality with absolute error range.
- Parameters
-
- Returns
- true, if equal
static boolean wblut.math.WB_Epsilon.isEqualHybrid |
( |
final double |
x, |
|
|
final double |
y |
|
) |
| |
|
static |
Equality with error range. Absolute for small values, relative for large values
- Parameters
-
- Returns
- true, if equal
static boolean wblut.math.WB_Epsilon.isEqualRel |
( |
final double |
x, |
|
|
final double |
y |
|
) |
| |
|
static |
Equality with relative error range.
- Parameters
-
- Returns
- true, if equal
static boolean wblut.math.WB_Epsilon.isZero |
( |
final double |
x | ) |
|
|
static |
Check if value is zero with error range.
- Parameters
-
- Returns
- true, if zero
static boolean wblut.math.WB_Epsilon.isZeroSq |
( |
final double |
x | ) |
|
|
static |
Check if value is zero within squared error range.
- Parameters
-
- Returns
- true, if zero
double wblut.math.WB_Epsilon.EPSILON = 1e-6 |
|
static |
double wblut.math.WB_Epsilon.EPSILONANGLE = 1e-3 * Math.PI / 180.0 |
|
static |
General precision when square is used > EPSILON*EPSILON.
The documentation for this class was generated from the following file: