QoL: Add billions to money utils (#4460)

## Description:

A simple QoL to handle cases where money surpasses $1B. I have seen this
happen in both custom games and post-game, and generally looks nicer
than just showing a thousand millions.

<img width="242" height="71" alt="image"
src="https://github.com/user-attachments/assets/abc9adb5-2e8f-485f-93ff-47a43a019d85"
/>


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory

## Please put your Discord username so you can be contacted if a bug or
regression is found:

bijx
This commit is contained in:
bijx
2026-06-30 15:09:30 -04:00
committed by GitHub
parent ae0d9f8d5e
commit 36b23d314f
+7 -1
View File
@@ -285,7 +285,13 @@ export function renderNumber(
num = Number(num);
num = Math.max(num, 0);
if (num >= 10_000_000) {
if (num >= 10_000_000_000) {
const value = Math.floor(num / 100000000) / 10;
return value.toFixed(fixedPoints ?? 1) + "B";
} else if (num >= 1_000_000_000) {
const value = Math.floor(num / 10000000) / 100;
return value.toFixed(fixedPoints ?? 2) + "B";
} else if (num >= 10_000_000) {
const value = Math.floor(num / 100000) / 10;
return value.toFixed(fixedPoints ?? 1) + "M";
} else if (num >= 1_000_000) {