decimal places inside macros

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

decimal places inside macros

Rainer M. Engel
I noticed that parseFloat() reduces the decimal places to 4 digits. Is
there a way to change this globally. I hoped that the decimal setting
under "Set Measurements" i.e. might do something like this for up to 9
maybe.


Regards,
Rainer

--
Rainer M. Engel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: decimal places inside macros

Herbie
Good day Rainer,

I think you are mixing things a bit.

Run this macro

str = "0.123456789";
flt = parseFloat( str );
print( d2s( flt, 9 ) );

and you will see that "float" isn't limited to 4 decimals but printing
it may be ...

HTH

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 22.03.18 um 16:40 schrieb Rainer M. Engel:
> I noticed that parseFloat() reduces the decimal places to 4 digits. Is
> there a way to change this globally. I hoped that the decimal setting
> under "Set Measurements" i.e. might do something like this for up to 9
> maybe.
>
>
> Regards,
> Rainer
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: decimal places inside macros

Rainer M. Engel
Hey Herbie,

looking back to the time before I had your reply, I would say you're
right with your assumption .. :)

Now I know.. Thank you for this advice..

Ahoi,
Rainer


Am 22.03.2018 um 16:47 schrieb Herbie:

> Good day Rainer,
>
> I think you are mixing things a bit.
>
> Run this macro
>
> str = "0.123456789";
> flt = parseFloat( str );
> print( d2s( flt, 9 ) );
>
> and you will see that "float" isn't limited to 4 decimals but printing
> it may be ...
>
> HTH
>
> Herbie
>
> ::::::::::::::::::::::::::::::::::::::::::::
> Am 22.03.18 um 16:40 schrieb Rainer M. Engel:
>> I noticed that parseFloat() reduces the decimal places to 4 digits. Is
>> there a way to change this globally. I hoped that the decimal setting
>> under "Set Measurements" i.e. might do something like this for up to 9
>> maybe.
>>
>>
>> Regards,
>> Rainer
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html