Ceiling()

CEILING()

Rounds up a number to the next integer

Syntax

      CEILING( <nNumber> ) -> nUpRoundedNumber

Arguments

<nNumber> number to round up

Returns

<nUpRoundedNumber> the rounded number

Description

The function CEILING() determines the smallest integer that is bigger than <nNumber>.

Examples

      ? ceiling( 1.1 )  // --> 2.0
      ? ceiling( -1.1 ) // --> -1.0

Tests

      ceiling( 1.1 )  == 2.0
      ceiling( -1.1 ) == -1.0

Compliance

CEILING() is compatible with CT3’s CEILING().

Platforms

All

Files

Source is math.c, library is libct.

Seealso

FLOOR

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s