Void SetPrecision ( int precision )

From FM Plugin Wikipedia
Jump to: navigation, search

SetPrecision

This function allows you to specify the Percision to use for FixPt numbers.


The default is 16 (as set in fmx::FixPt::kDefltFixedPrecision )


This is necessary if you AssignDouble, to ensure a number like 0.2 doesn't get shown in FileMaker as 0.1999999999999


In the following example, we will assign a Double to a FixPt, and then set it's precision to the default of 16

double      value;
fmx::FixPtAutoPtr    result;

value = 19.2 ;

result->AssignDouble( value );

result->SetPrecision( fmx::FixPt::kDefltFixedPrecision );