ceiling

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the ceiling of <number>
ceiling(<number>)
Synonymsceil
Summary

Returns the smallest integer greater than or equal to number.

Introduced7.1
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
number

Any number, or expression that evaluates to a number.

Example
ceiling(33.567) -- result is 34
ceiling(-6.3) -- result is -6
Values
NameTypeDescription
return

The ceiling function returns an integer.

RelatedKeyword: integer
Function: trunc, abs, floor
Glossary: return
Control Structure: function
Description

Use the ceiling function to return the greatest integer less than or equal to a number.

The ceiling function does not always return the integer closest to the number. For example, ceiling(5.1) returns 6, but ceiling(4.99) returns 5.

Tagsmath