Ceil Function | |
Round a number up to the next highest integer.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION Ceil(
nNumber AS USUAL
) AS USUAL
public static Usual Ceil(
Usual nNumber
)
Request Example
View SourceParameters
- nNumber
- Type: Usual
The number to round.
Return Value
Type:
Usual
The integer part (no decimals) of the nearest number that is greater than or equal to
nNumber. Since both
nNumber and the return value are data type USUAL, you are not limited to the size of an integer.
Remarks
Ceil() rounds a positive number with a fractional portion up to the next highest integer and returns the integer portion of a negative number.
Examples
These examples illustrate Ceil() on a positive and a negative value:
1? Ceil(1.6)
2? Ceil(-1.6)
See Also