This function rounds a number up.
The parameter of this function can be defined as an XPath, variable or number.
•The input parameter must be double.
•The supported attribute types to use as input XPath parameter (or Xpaths stored in variables) are: integer, currency, float, real.
•Use the IsNaN function to validate the parameter is a number.
A sand transporting company calculates the number of necessary trucks to transport a specific freight as the quotient of the freight weight and the capacity of trucks. As the result obtained might be fractional (which has no sense in this context because the company cannot hire a fraction of a truck), this result must be rounded up. In Bizagi this can be done by using the Ceiling function:
//Obtain the number of trucks needed
NumberofTrucks = <Freight.Weight> / <Freight.Trucks.WeightCapacity>;
//Round up the number of trucks
<Freight.RequiredTrucks> = CHelper.Math.Ceiling(NumberofTrucks);