RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Math.Ceil Function

Rounds variables up toward positive infinity.

Pascal
function Ceil(const X: Extended): Integer;
C++
int Ceil(const Extended X);

Math

Call Ceil to obtain the lowest integer greater than or equal to 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 

 

Trunc 

Floor 

Ceil

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!