List of utility methods to do Number Power
float | pow(final float a, final float b) Computes a fast approximation to Math.pow(a, b) .
return (float) Math.pow(a, b); |
long | pow(final int a, final int b) Integer version of Math#pow(double,double) . long c = 1; for (int i = 0; i < b; ++i) c *= a; return c; |
int | pow(final int a, final int b) pow if (b == 0) return 1; else if (b == 1) return a; else { int result = a; for (int i = 1; i < b; i++) result *= a; ... |
int | pow(final int b, final int e) Retrieves the value of the base raised to the power of the exponent if (e < 0) { throw new IllegalArgumentException("pow does not support negative exponent: " + e); int v = 1; for (int i = 0; i < e; i++) { v *= b; return v; ... |
long | pow(final long base, final long exponent) pow if (exponent == 0) { return 1; } else { long start = base; for (int i = 1; i < exponent; i++) { start *= base; return start; ... |
float | pow(float a, float b) pow return (float) StrictMath.pow(a, b); |
float | Pow(float base, float exponent) Pow return (float) Math.pow(base, exponent); |
float | pow(float x, int y) Raises first argument to the power of the second argument. float val = 1.0f; for (int i = 0; i < Math.abs(y); i++) { val *= x; if (y < 0) { return 1.0f / val; return val; ... |
float[] | pow(float[] inData, float rate) pow float[] out = new float[inData.length]; for (int i = 0; i < inData.length; i++) { out[i] = (float) Math.pow(inData[i], rate); return out; |
void | pow(float[][] in) pow int width = in[0].length; int height = in.length; for (int yy = 0; yy < height; yy++) { for (int xx = 0; xx < width; xx++) { in[yy][xx] = in[yy][xx] * in[yy][xx]; |