Java Utililty Methods Number Negate

List of utility methods to do Number Negate

Description

The list of methods to do Number Negate are organized into topic(s).

Method

intnegative(int b)
Constant-time determine if byte is negative.
return (b >> 8) & 1;
Numbernegative(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();
...
doublenegativeInf()
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;
intnegativeStatistics(double[] array)
negative Statistics
int count = 0;
for (double value : array)
    if (value < 0)
        count++;
return count;