_CEIL - mkilgore/QB64pe GitHub Wiki
The _CEIL function rounds a numeric value up to the next whole number or INTEGER value.
- result = _CEIL(expression)
- _CEIL returns he smallest integral value that is greater than the numerical expression (as a floating-point value).
- This means that _CEIL rounds up for both positive and negative numbers.
- QB64 1.0 and up (QB64 Team)
- QBPE 0.5 and up (QB64 Phoenix Edition)
Example: Displaying the rounding behavior of INT, CINT and FIX vs _CEIL.
PRINT INT(2.5), CINT(2.5), FIX(2.5), _CEIL(2.5) PRINT INT(-2.5), CINT(-2.5), FIX(-2.5), _CEIL(-2.5) |
2 2 2 3 -3 -2 -2 -2 |
Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page