Skip to content

Commit

Permalink
Fix rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
lulunac27a committed Jan 21, 2025
1 parent bd6d5f2 commit 009ee02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ def add_xp(self, amount: float) -> None: # add XP
amount
* self.multiplier
* self.time_multiplier
* (1 + 5.0 / (abs(time_difference_seconds) + 1))
* (1 + 5.0 / (abs(time_difference_seconds) + 1.0))
) # add XP by amount
self.total_xp += round(
amount
* self.multiplier
* self.time_multiplier
* (1 + 5.0 / (abs(time_difference_seconds) + 1))
* (1 + 5.0 / (abs(time_difference_seconds) + 1.0))
) # add total XP by amount
self.check_level_up() # check if user has leveled up

Expand Down

0 comments on commit 009ee02

Please sign in to comment.