mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 21:58:27 +01:00
Fix fmti() for very large numbers around 1e15
This commit is contained in:
parent
39fc4bffb5
commit
6433ebaa82
@ -405,7 +405,7 @@ function str_strip(s,c) = str_strip_trailing(str_strip_leading(s,c),c);
|
|||||||
// fmti(-123456789012345); // Returns "-123456789012345"
|
// fmti(-123456789012345); // Returns "-123456789012345"
|
||||||
function fmti(i,mindigits=1) =
|
function fmti(i,mindigits=1) =
|
||||||
i<0? str("-", fmti(-i)) :
|
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" :
|
i==0? "0" :
|
||||||
str_join(
|
str_join(
|
||||||
concat(
|
concat(
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,158];
|
BOSL_VERSION = [2,0,159];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user