From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
| This item was deprecated in version 2020r1.
Please use Ceiling as a replacement.
result = Ceil(value)
|result||The ceiling of value.|
|value||The value you want the ceiling of.|
The result of this function is a Double, but it will always contain a whole number.
This code uses the Ceil function to return ceiling of a number.
Because Ceil will always return a whole number, to round a decimal value to a certain number of places, you must first multiple the number by 10^(the number of decimal places to which you wish to round) then take the value returned by Ceil of that number and divide it by 10^(the number of decimal places to which you wish to round). In this code, the value 1.2345 is being rounded to two decimal places: