List of utility methods to do Number Negate
int | negative(int b) Constant-time determine if byte is negative. return (b >> 8) & 1;
|
Number | negative(Number n) negative if (n instanceof Double) { return -n.doubleValue(); } else if (n instanceof Float) { return -n.floatValue(); } else if (n instanceof Long) { return -n.longValue(); } else { return -n.intValue(); ... |
double | negativeInf() negative Inf return Double.NEGATIVE_INFINITY;
|
double[] | negativePart(final double[] data) negative Part final double[] ret = new double[data.length]; for (int i = data.length; 0 != i--;) ret[i] = min(data[i], -0.0); return ret; |
int | negativeStatistics(double[] array) negative Statistics int count = 0; for (double value : array) if (value < 0) count++; return count; |