about summary refs log tree commit diff stats
path: root/412print-float-decimal.mu
diff options
context:
space:
mode:
Diffstat (limited to '412print-float-decimal.mu')
-rw-r--r--412print-float-decimal.mu7
1 files changed, 7 insertions, 0 deletions
diff --git a/412print-float-decimal.mu b/412print-float-decimal.mu
index a95511bf..ef966390 100644
--- a/412print-float-decimal.mu
+++ b/412print-float-decimal.mu
@@ -490,6 +490,13 @@ fn print-float-buffer-in-scientific-notation screen: (addr screen), _buf: (addr
   print-int32-decimal screen, dp
 }
 
+# pretty hacky for now
+fn float-size n: float, precision: int -> _/eax: int {
+  var result/eax: int <- copy precision
+  result <- add 4  # 1 for '.', 3 for exponent
+  return result
+}
+
 ## helper
 
 # like check-strings-equal, except array sizes don't have to match