This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __truncate(n, decimals=7): | |
multiplier = 10 ** decimals | |
return int(n * multiplier) / multiplier | |
def get_xp_from_lvl(lvl): | |
return int((5/3) * lvl**3 + (45/2) * lvl**2 + (455/6) * lvl) | |
def get_lvl_from_xp(xp): | |
a = 5/3 | |
b = 45/2 |