Package com.io7m.jequality
Class AlmostEqualDouble.ContextRelative
java.lang.Object
com.io7m.jequality.AlmostEqualDouble.ContextRelative
- Enclosing class:
- AlmostEqualDouble
The necessary context for floating point comparisons.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
void
setMaxAbsoluteDifference
(double max) Set the current maximum absolute differencevoid
setMaxRelativeDifference
(double max) Set the current maximum relative differencetoString()
-
Constructor Details
-
ContextRelative
public ContextRelative()Construct a new equality context.
-
-
Method Details
-
getMaxAbsoluteDifference
public double getMaxAbsoluteDifference()- Returns:
- The current maximum absolute difference
-
setMaxAbsoluteDifference
public void setMaxAbsoluteDifference(double max) Set the current maximum absolute difference- Parameters:
max
- The required difference
-
getMaxRelativeDifference
public double getMaxRelativeDifference()- Returns:
- The current maximum relative difference
-
setMaxRelativeDifference
public void setMaxRelativeDifference(double max) Set the current maximum relative difference- Parameters:
max
- The required difference
-
toString
-