Hi, so I've got a function that gives me a XP for a given level.
I'm looking at finding the inverse: (Level from XP)
e.g:
int GetXPForLevel(int level) {
float baseXP = 100;
float xp = (Mathf.Pow(level, 2) + level) / 2 * baseXP - (level * baseXP);
return Mathf.FloorToInt(xp);
}
int GetLevelForXP(int xp) {
//need the inverse of the above function
return 0;
}
My Math skills are not great :(, not sure where to even begin