GodotBigNumberClass icon indicating copy to clipboard operation
GodotBigNumberClass copied to clipboard

log function missing

Open Saadies opened this issue 8 months ago • 0 comments

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

Saadies avatar Jun 25 '24 16:06 Saadies