PDF calculate average without rounding

23 views Asked by At

Need help with PDF form. I want Field 3 to take average of Fields 1 and 2, and display unrounded number.

Settings:

Field 1, Number, zero decimal places

Field 2, Number, Zero decimal places

Field 3, Average, Field 1 and Field 2 selected.

My problem with these settings is that Field 3 would show the unrounded average and then if I click anywhere on the page, Field 3 would change to the rounded average.

Then, I found this posted by jdaz:

System.out.print( (double)(a + b) /2 );

This stops it from changing when I click on the page, but it still shows rounded.

How can I edit this script to stop rounding?

0

There are 0 answers