CPoint:Ceil


The Ceil method rounds the x,y properties to the next higher integer value. For example P.x=100.54 becomes P.x=101. Compare with the Round and Floor methods.

Syntax

CPoint:Ceil()

Example

The following script lists the values of a point before and after using the Ceil method.

P = NewPoint( 50.322, 100.55 )

-- Create a CPoint

Printf("%lg, %lg\n", P:Get() )

-- result: 50.322, 100.55

P:Ceil()

-- round to the next lower integer values

Printf("%lg, %lg\n", P:Get() )

-- result: 51, 101

Related Topics

Round

Floor

Get

CPoint class