Skip to content

Commit

Permalink
Fix nearlyEquals docstring and variable name to be absolute instead o…
Browse files Browse the repository at this point in the history
…f relative
  • Loading branch information
Tara Drwenski committed Jan 17, 2024
1 parent bb69bbd commit f4e3864
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cdm/core/src/main/java/ucar/nc2/util/Misc.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,24 @@ public static double relativeDifference(double a, double b) {
}
}

/** RelativeDifference is less than {@link #defaultMaxRelativeDiffFloat}. */
/** AbsoluteDifference is less than {@link #defaultMaxRelativeDiffFloat}. */
public static boolean nearlyEquals(float a, float b) {
return nearlyEquals(a, b, defaultMaxRelativeDiffFloat);
}

/** RelativeDifference is less than maxRelDiff. */
public static boolean nearlyEquals(float a, float b, float maxRelDiff) {
return DoubleMath.fuzzyEquals(a, b, maxRelDiff);
/** AbsoluteDifference is less than maxAbsDiff. */
public static boolean nearlyEquals(float a, float b, float maxAbsDiff) {
return DoubleMath.fuzzyEquals(a, b, maxAbsDiff);
}

/** RelativeDifference is less than {@link #defaultMaxRelativeDiffDouble}. */
/** AbsoluteDifference is less than {@link #defaultMaxRelativeDiffDouble}. */
public static boolean nearlyEquals(double a, double b) {
return nearlyEquals(a, b, defaultMaxRelativeDiffDouble);
}

/** RelativeDifference is less than maxRelDiff. */
public static boolean nearlyEquals(double a, double b, double maxRelDiff) {
return DoubleMath.fuzzyEquals(a, b, maxRelDiff);
/** AbsoluteDifference is less than maxAbsDiff. */
public static boolean nearlyEquals(double a, double b, double maxAbsDiff) {
return DoubleMath.fuzzyEquals(a, b, maxAbsDiff);
}

/** AbsoluteDifference is less than maxAbsDiff. */
Expand Down

0 comments on commit f4e3864

Please sign in to comment.