Skip to content

Commit

Permalink
Don't convert between double and single precision floats
Browse files Browse the repository at this point in the history
  • Loading branch information
timoschwarzer committed Jul 7, 2024
1 parent 7ebb3d6 commit 8dd7e5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/wotw/server/database/model/LeagueSeason.kt
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ class LeagueSeason(id: EntityID<Long>) : LongEntity(id) {
val partToActuallyDiscardAdditionally = max(
0.0f,
min(
submission.rankingMultiplier.toDouble(),
min(partRequestedToDiscardAdditionally, availableAdditionalParts - additionalPartsDiscarded)
).toFloat()
submission.rankingMultiplier,
min(partRequestedToDiscardAdditionally, availableAdditionalParts - additionalPartsDiscarded).toFloat()
)
)

submission.rankingMultiplier -= partToActuallyDiscardAdditionally
Expand Down

0 comments on commit 8dd7e5e

Please sign in to comment.