System.Math.Ceil

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function Ceil(const X: Single): Integer;
function Ceil(const X: Double): Integer;
function Ceil(const X: Extended): Integer;

C++

extern DELPHI_PACKAGE int __fastcall Ceil(const float X)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Math.pas
System.Math.hpp
System.Math System.Math

Description

Rounds variables up toward positive infinity.

Call Ceil (as in ceiling) 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

See Also