List of utility methods to do Number Min Value
double | findMin(double newNumber, double currentMin) Return the min between 2 numbers. return Double.isNaN(currentMin) ? newNumber : currentMin > newNumber ? currentMin : newNumber;
|
int | findMin(int a, int b, int c, int d) find Min int result = Math.min(a, b); result = Math.min(result, c); result = Math.min(result, d); return result; |
double | findMinAngularDistance(double angle1, double angle2) Finds the minimum angular distance between two angles. double angDistance = 0.0; if (Math.signum(angle2) == Math.signum(angle1)) { angDistance = Math.abs(angle2 - angle1); } else { double sumAngle = Math.abs(angle1) + Math.abs(angle2); angDistance = Math.min(sumAngle, 360 - sumAngle); return angDistance; ... |
double | min(final double p_first, final double p_second, final double p_third) returns the minimum of three elemens return Math.min(Math.min(p_first, p_second), p_third);
|
Object | min(Comparable c1, Comparable c2) Null safe comparison of Comparables. if (c1 != null && c2 != null) { return c1.compareTo(c2) < 1 ? c1 : c2; } else { return c1 != null ? c1 : c2; |
Object | min(Comparable c1, Comparable c2) min if (c1 != null && c2 != null) { return c1.compareTo(c2) < 1 ? c1 : c2; } else { return c1 != null ? c1 : c2; |
Double | min(Double a, Double b) Like Math#min but null safe. if (a == null) { return b; } else if (b == null) { return a; } else { return Math.min(a, b); |
double | min(double a, double b) Binary min, without handling of special values. return a <= b ? a : b;
|
double | min(double a, double b) min return a > b ? b : a;
|
double | min(double a, double b) min return Math.min(a, b);
|