These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

only round upwards?

cfinley
Registered: Jan 9 2008
Posts: 70

i have read a few posts on rounding numbers to the nearest whole interger, but is there any way to specify you only want to round to the next higher number, no matter the value of the decimal?

Thanks

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You can use the "Ceiliing" method of the JavaScript "Math" object, "Returns the smallest integer greater than or equal to a number."

Math.ceil(fValue)

The Math object also has the following methods:
floor - "Returns the largest integer less than or equal to a number."

Math.floor(fValue)

round - "Returns the value of a number rounded to the nearest integer."

Math.round(fValue)

George Kaiser