Android Utililty Methods Int Power Calculate

List of utility methods to do Int Power Calculate

Description

The list of methods to do Int Power Calculate are organized into topic(s).

Method

intpow(final int k, int e)
Raise an int to an int power.
if (e < 0) {
    throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
int result = 1;
int k2p = k;
while (e != 0) {
    if ((e & 0x1) != 0) {
        result *= k2p;
...
intpow(final int k, long e)
Raise an int to a long power.
if (e < 0) {
    throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
int result = 1;
int k2p = k;
while (e != 0) {
    if ((e & 0x1) != 0) {
        result *= k2p;
...
intcomputeExp(int expCurve, int level)
Computes the exp for a given exp curve and level
return (int) Math.round(expCurve
        * Math.pow((float) (level - 1) / 98, 2.5));