Round number to highest integer based on calculated text field
I'm not a java guy, but I've gone over the internet threads and couldn't find the exact fix to my problem. I'm using acrobat pro dc. I'm using a text field formatted to number with the following calculation:
(A+B+C+D)/4 in the simplified field notation.
I now need this calculation to always round up to the highest integer. Here are a few examples:
12.1=13
12.5=13
12.9=13
etc.
From what I've read, everyone says to use Math.ceil(); however, I cannot enter an actual number with Math.ceil() since I don't know the numbers because it's calculating them based on user input from other fields.
I believe it has something to do with inputting the following math equation:
( x + y - 1 ) / y
I just don't know how to implement it. Also, does it matter if I have number set to 0 or 2 for decimal places if I'm just looking for the higher integer?
Any custom calculation or validation scripts I can use to fix this? Thanks!
