Fix fmti() for very large numbers around 1e15

This commit is contained in:
Revar Desmera 2020-03-05 03:28:41 -08:00
parent 39fc4bffb5
commit 6433ebaa82
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -8,7 +8,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,158];
BOSL_VERSION = [2,0,159];
// Section: BOSL Library Version Functions