Skip to content

Commit

Permalink
Merge pull request #1287 from tdrwenski/fix-nearlyEquals-docstring
Browse files Browse the repository at this point in the history
Update nearlyEquals docstring
  • Loading branch information
haileyajohnson authored Jan 17, 2024
2 parents bb69bbd + f4e3864 commit 23ecb6b
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 23ecb6b

Please sign in to comment.