Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mees committed Oct 19, 2024
1 parent 20c90ac commit c7e463b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stores/gameStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,10 @@ export const useGameStore = defineStore('gameStore', {
return scaledNumber.toFixed(toFixed) + suffixes[exponent]
}

if (toFixed === 0) {
toFixed = 2
}

// Use E notation for numbers 100 million and above
return value.toExponential(toFixed)
},
Expand Down

0 comments on commit c7e463b

Please sign in to comment.