Login  Register

Re: Decimal Fractions in ResultsTable

Posted by Michael Schmid on Mar 18, 2010; 9:58am
URL: http://imagej.273.s1.nabble.com/Decimal-Fractions-in-ResultsTable-tp3688918p3688919.html

Hi David,

what about this?

ResultsTable.setPrecision(int precision)
Sets the number of digits to the right of decimal point.

Michael
________________________________________________________________

On 18 Mar 2010, at 03:00, David William Webster wrote:

> All,
>
> I am trying to create/display a ResultsTable containing  or showing
> decimal fractions. But, all I get are ints. I am doing something like
>
> ResultsTable rt = new ResultsTable();
> double x   = 1.0;
> rt.addValue("x", x);
> rt.show("My Table");
>
> But, I don't get the x value as 1.0, only 1. How can I get the  
> displayed
> and/or "save'ed" table to have doubles in it? I notice that if rt  
> was a
> systems result
> table created via "ResultsTable rt =
> ResultsTable.getResultsTable()", then I get decimals freactions rather
> than ints.
>
> David Webster