public interface FloatingPointTolerance
Modifier and Type | Field and Description |
---|---|
static FloatingPointTolerance |
EXACT
A tolerance requiring exact value equivalence.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isWithinTolerance(BigDecimal value1,
BigDecimal value2)
Indicates whether the specified values are equal under the tolerance.
|
boolean |
isWithinTolerance(double value1,
double value2)
Indicates whether the specified values are equal under the tolerance.
|
boolean |
isWithinTolerance(float value1,
float value2)
Indicates whether the specified values are equal under the tolerance.
|
static final FloatingPointTolerance EXACT
boolean isWithinTolerance(float value1, float value2)
value1
- the first value to comparevalue2
- the second value to comparetrue
if the two values lie with the error bounds,
otherwise false
boolean isWithinTolerance(double value1, double value2)
value1
- the first value to comparevalue2
- the second value to comparetrue
if the two values lie with the error bounds,
otherwise false
boolean isWithinTolerance(BigDecimal value1, BigDecimal value2)
value1
- the first value to comparevalue2
- the second value to comparetrue
if the two values lie with the error bounds,
otherwise false
Copyright © 2021 Actian Corporation. All rights reserved.