Skip to content

Commit

Permalink
One does not need to multiply by 100 when using percent format
Browse files Browse the repository at this point in the history
  • Loading branch information
twobiers committed Nov 1, 2024
1 parent 559cbc1 commit 84da696
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/loot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class LootCommand implements ApplicationCommand {
const lootWithProbabilitiy = loot
.map(l => ({
...l, // Oh no, please optimize for webscale. No need to copy the whole data :cry:
probability: Number((l.weight / totalWeight) * 100),
probability: Number(l.weight / totalWeight),
}))
.sort()
.reverse();
Expand Down

0 comments on commit 84da696

Please sign in to comment.