I don't like this function's name, not descriptive enough. How about XPAmountToLevel() ?