Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class XP {
- public static long GetXPFromLevel(int level) {
- return (1000*level*level);
- }
- public static int GetLevelFromXP(long xp) {
- int ret = 0;
- while((1000*ret*ret) <= xp) ret++;
- return (ret-1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement