Update the truncate number function to use decimal point (#333)

* Fixed to truncate as "1.234M" instead of "1234K"

* Optimized by switching to strings to avoid divisions

* Changed FP constants to strings

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
MeirGavish
2025-12-23 07:52:30 +02:00
committed by GitHub
co-authored by Copilot
parent f76c25614c
commit 6575fc7f94
8 changed files with 304 additions and 84 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ CC := gcc
CFLAGS := -I../../include -I. \
-g -O3 -std=gnu23 -Wall -Werror -Wno-format
SRC := util_test.c ../../source/util.c
SRC := util_test.c ../../source/util.c ../../source/font.c
OUT := build/util_test
$(OUT): $(SRC) | build