nquest/pkg/utils/exp.go

12 lines
202 B
Go
Raw Normal View History

package utils
import "math"
func ExpToLevel(exp int) int {
return int(math.Floor((math.Sqrt(625+100*float64(exp))-25)/50)) + 1
}
func LevelToExp(level int) int {
return 25*level*level - 25*level
}