List of utility methods to do Number Minus
int | minus(boolean a, boolean b) minus int aa = a ? 1 : 0; int bb = b ? 1 : 0; return aa - bb; |
double[] | minus(double a[], double b) Creates a new vector by subtracting the given real number from the given vector. double[] c = new double[a.length]; for (int i = 0; i < c.length; i++) { c[i] = a[i] - b; return c; |
double[] | minus(double[] a) minus final double[] r = new double[a.length]; for (int i = 0; i < a.length; ++i) { r[i] = -a[i]; return r; |
double[] | minus(double[] p, double[] q) minus return new double[] { p[0] - q[0], p[1] - q[1], p[2] - q[2] }; |
void | minus(double[][] x, double[][] y, double[][] r) minus for (int i = 0; i < x.length; i++) { for (int j = 0; j < x[i].length; j++) { r[i][j] = x[i][j] - y[i][j]; |
int | minus(int flags, int set) minus return flags & ~set;
|
Integer | minus(Integer a, Integer b) minus return new Integer(a.intValue() - b.intValue()); |
Number | minus(Number n) Negate a number Number value = normalize(n); Class<?> type = value.getClass(); if (type == Long.class) return Long.valueOf(-n.longValue()); return new Double(-n.doubleValue()); |
Number | minus(Number n) Returns The negation of a number, regardless of its type. if (n instanceof Long) return new Long(-n.longValue()); if (n instanceof Integer) return new Integer(-n.intValue()); if (n instanceof Short) return new Short((short) -n.shortValue()); if (n instanceof Byte) return new Byte((byte) -n.byteValue()); ... |
String | minus(String bigger, String smaller) Minus operator if (bigger.length() > smaller.length()) { return bigger.replace(smaller, ""); } else throw new IllegalArgumentException(""); |