From 6433ebaa8284154c805521e02975f7f8bff997a9 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Thu, 5 Mar 2020 03:28:41 -0800 Subject: [PATCH] Fix fmti() for very large numbers around 1e15 --- strings.scad | 2 +- version.scad | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/strings.scad b/strings.scad index 0e656f8..42bef64 100644 --- a/strings.scad +++ b/strings.scad @@ -405,7 +405,7 @@ function str_strip(s,c) = str_strip_trailing(str_strip_leading(s,c),c); // fmti(-123456789012345); // Returns "-123456789012345" function fmti(i,mindigits=1) = i<0? str("-", fmti(-i)) : - let(i=floor(i), e=floor(log(i)+1e-15)) + let(i=floor(i), e=floor(log(i))) i==0? "0" : str_join( concat( diff --git a/version.scad b/version.scad index 042742d..9730ff4 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,158]; +BOSL_VERSION = [2,0,159]; // Section: BOSL Library Version Functions