User Tools

Site Tools


syntax:functions:ceiling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:ceiling [2020/11/26 18:12] dmitrysyntax:functions:ceiling [2021/08/11 15:15] (current) – [Examples] craigt
Line 1: Line 1:
-===== Ceiling(number) =====+====== Ceiling(number) =====
 +Category:  Number function
  
-Nearest integer (or full, not fractionalnumber towards positive infinity.+\\  
 +=====Description===== 
 +This function rounds //number// up to the nearest integer or full, non-fractional number towards positive infinity.
  
- Example   Result  +\\  
-ceiling( 0 - 20.5)   -20 | +=====Arguments===== 
-| ceiling( 20.5 )       21 |+^Argument^Type^Description
 +|number|Number|The value, usually fractional, to be rounded.| 
 +\\  
 +**Return value type:**  Number
  
-=== See also === +\\  
-  * [[syntax:functions:floor]] +=====Remarks===== 
-  * [[syntax:functions:ceiling]] +If the argument provided has //any// decimal portion, the whole number will be rounded up (towards positive infinity) to the next nearest whole number. 
-  * [[syntax:functions:truncate]]+ 
 +\\  
 +=====Examples===== 
 + 
 +  ceiling(20.0001) //Returns 21 
 + 
 +  ceiling(20.5) //Returns 21 
 + 
 +  ceiling(20.9999) //Returns 21 
 + 
 +  ceiling(-20.0001) //Returns -20  (Rounded up towards positive infinity) 
 + 
 +  ceiling(-20.5) //Returns -20  (Rounded up towards positive infinity) 
 + 
 +  ceiling(-20.9999) //Returns -20  (Rounded up towards positive infinity) 
 + 
 +\\  
 +===== See also ===== 
 +  * [[syntax:functions:floor|Floor(number)]] 
 +  * [[syntax:functions:truncate|Truncate(number)]]
syntax/functions/ceiling.txt · Last modified: 2021/08/11 15:15 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki