List of utility methods to do Square Calculate
double | squareRoot(Number num) Compute an approximate square root of num. double n = num.doubleValue(); double lower = 1.0; double upper = n; while (upper - lower > 0.0001) { double mid = upper / 2.0 + lower / 2.0; if (mid * mid < n) lower = mid; else ... |
double | squareSign(double value) square Sign if (value < 0) { return -(value * value); return value * value; |
double | squareSum(double... doubles) square Sum double sum = 0; for (double d : doubles) { sum += d * d; return sum; |