Login  Register

Re: Decimal Fractions in ResultsTable

Posted by David Webster on Mar 18, 2010; 6:37pm
URL: http://imagej.273.s1.nabble.com/Decimal-Fractions-in-ResultsTable-tp3688918p3688921.html

Micheal,

I am doing that with no luck. Could it be something to do with using a non
system ResultsTable?

David

On Thu, Mar 18, 2010 at 2:58 AM, Michael Schmid <[hidden email]>wrote:

> 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
>>
>