Android Int Power Calculate computeExp(int expCurve, int level)

Here you can find the source of computeExp(int expCurve, int level)

Description

Computes the exp for a given exp curve and level

License

Open Source License

Parameter

Parameter Description
expCurve the expCurve
level the level

Return

the exp for a given exp curve and level

Declaration

public static int computeExp(int expCurve, int level) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*  www  .ja  v  a 2s. c  o  m*/
     * Computes the exp for a given exp curve and level
     *
     * @param expCurve the expCurve
     * @param level the level
     * @return the exp for a given exp curve and level
     * @see "http://pad.wikia.com/wiki/Monster_EXP_Curves"
     */
    public static int computeExp(int expCurve, int level) {
        return (int) Math.round(expCurve
                * Math.pow((float) (level - 1) / 98, 2.5));
    }
}

Related

  1. pow(final int k, int e)
  2. pow(final int k, long e)