System.Math.Ceil
Delphi
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 */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
説明
変数を正の無限大方向へ切り上げます。
Ceil を呼び出すと(天井関数として)、X 以上でもっとも低い整数を取得することができます。X の絶対数は、MaxInt より小さくなければなりません。例:
Ceil(-2.8) = -2
Ceil(2.8) = 3
Ceil(-1.0) = -1