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