Skip to content

Commit 009ee02

Browse files
committed
Fix rounding
1 parent bd6d5f2 commit 009ee02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ def add_xp(self, amount: float) -> None: # add XP
9292
amount
9393
* self.multiplier
9494
* self.time_multiplier
95-
* (1 + 5.0 / (abs(time_difference_seconds) + 1))
95+
* (1 + 5.0 / (abs(time_difference_seconds) + 1.0))
9696
) # add XP by amount
9797
self.total_xp += round(
9898
amount
9999
* self.multiplier
100100
* self.time_multiplier
101-
* (1 + 5.0 / (abs(time_difference_seconds) + 1))
101+
* (1 + 5.0 / (abs(time_difference_seconds) + 1.0))
102102
) # add total XP by amount
103103
self.check_level_up() # check if user has leveled up
104104

0 commit comments

Comments
 (0)