Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log function missing #39

Open
Saadies opened this issue Jun 25, 2024 · 0 comments
Open

log function missing #39

Saadies opened this issue Jun 25, 2024 · 0 comments

Comments

@Saadies
Copy link

Saadies commented Jun 25, 2024

Hi,

Can you add a log function to be used with Big numbers?

I want to calculate the "level" from a given experience value as in:
XP: 10 -> Level 1
XP: 20 -> Level 2
XP: 40 -> Level 3
...
XP: 1e520 -> Level 5400 (just an example)

For that I would calculate it like this:
log(XP/ lvlBaseCost) / log(lvlCostRate)

For now I can just get the float from (XP / lvlBaseCost) since I won't hit the limit anytime soon but I think that potentially that should be added to this libarary.

Thank you for your work and kind regards

Karim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant