Skip to content

Commit

Permalink
allow for < 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Feb 5, 2024
1 parent 3c4f03c commit 229774c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion haxe/ui/util/StringUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ class StringUtil {
var a = Math.abs(n);
var i = n;
var suffix = "";
if (a >= THOUSAND && a < MILLION) {
if (a >= 0 && a < THOUSAND) {
suffix = "";
i = n;
} else if (a >= THOUSAND && a < MILLION) {
suffix = "K";
i = n / THOUSAND;
} else if (a >= MILLION && a < BILLION) {
Expand Down

0 comments on commit 229774c

Please sign in to comment.