From 39fc4bffb5586b3cc7e74cf8bfcf972e3d25b348 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Thu, 5 Mar 2020 02:11:43 -0800 Subject: [PATCH] fmtf() assert was in wrong place. --- strings.scad | 2 +- version.scad | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/strings.scad b/strings.scad index a051462..0e656f8 100644 --- a/strings.scad +++ b/strings.scad @@ -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 diff --git a/version.scad b/version.scad index c3b142f..042742d 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,157]; +BOSL_VERSION = [2,0,158]; // Section: BOSL Library Version Functions