From fd894c0e7308a40150c1e09b496a6cea40852189 Mon Sep 17 00:00:00 2001 From: Franz Zotter Date: Wed, 29 Aug 2007 14:36:17 +0000 Subject: added a "g" instead of the "f" to fwriteln.c for better precision, when using small or large numbers.:w svn path=/trunk/externals/zexy/; revision=8692 --- src/fwriteln.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fwriteln.c b/src/fwriteln.c index 5fa6679..882ed28 100644 --- a/src/fwriteln.c +++ b/src/fwriteln.c @@ -181,7 +181,7 @@ static void *fwriteln_new(t_symbol *s, int argc, t_atom *argv) x->x_textbuf=0; x->width=5; x->precision=2; - strcpy(x->format_string_afloats,"%*.*f "); + strcpy(x->format_string_afloats,"%*.*g "); for (k=0; kprecision=atom_getint(&argv[++k]); @@ -194,10 +194,10 @@ static void *fwriteln_new(t_symbol *s, int argc, t_atom *argv) x->width=(x->width>40)?40:x->width; } else if (atom_getsymbol(&argv[k])==gensym("-")) { - strcpy(x->format_string_afloats,"%-*.*f "); + strcpy(x->format_string_afloats,"%-*.*g "); } else if (atom_getsymbol(&argv[k])==gensym("+")) { - strcpy(x->format_string_afloats,"%+*.*f "); + strcpy(x->format_string_afloats,"%+*.*g "); } } return (void *)x; -- cgit v1.2.1