mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
fmtf() assert was in wrong place.
This commit is contained in:
parent
05405564b4
commit
39fc4bffb5
@ -430,7 +430,6 @@ function fmti(i,mindigits=1) =
|
||||
// fmtf(PI,12); // Returns: "3.14159265359"
|
||||
// fmtf([PI,-16.75],12); // Returns: "[3.14159265359, -16.75]"
|
||||
function fmtf(f,sig=12) =
|
||||
assert(is_num(f))
|
||||
assert(is_int(sig))
|
||||
assert(sig>0)
|
||||
is_list(f)? str("[",str_join(sep=", ", [for (g=f) fmtf(g,sig=sig)]),"]") :
|
||||
@ -438,6 +437,7 @@ function fmtf(f,sig=12) =
|
||||
str(f)=="nan"? "nan" :
|
||||
str(f)=="inf"? "inf" :
|
||||
f<0? str("-",fmtf(-f,sig=sig)) :
|
||||
assert(is_num(f))
|
||||
let(
|
||||
e = floor(log(f)),
|
||||
mv = sig - e - 1
|
||||
|
@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,157];
|
||||
BOSL_VERSION = [2,0,158];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user