Use the Ceil function from the Math block. From the documentation:
Rounds move towards positive infinity.
Call Ceil (as in the ceiling) to get the smallest integer greater than or greater than X. The absolute value of X must be less than MaxInt. For example:
- Ceil (-2.8) = -2
- Ceil (2.8) = 3
- Ceil (-1.0) = -1
I canβt say if Ceil behavior is in Ceil your expectations regarding negative input values ββbecause you didnβt specify what to do there. However, if Ceil does not meet your expectations, just write a function to meet your needs by combining Abs() and Ceil()
source share