User Tools

Site Tools


syntax:functions:floor

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:floor [2020/11/26 18:13] dmitrysyntax:functions:floor [2021/08/11 15:17] (current) – [Examples] craigt
Line 1: Line 1:
-===== Floor(number) =====+====== Floor(number) =====
 +Category:  Number function
  
-The nearest integer (i.e. full, not fractionalnumber towards negative infinity.+\\  
 +=====Description===== 
 +This function rounds //number// down to the nearest integer - or full, non-fractional number towards negative infinity.
  
- Example   Result  +\\  
- floor(-10.99)   -11  | +=====Arguments===== 
-|  floor( 10.99)    10  |+^Argument^Type^Description
 +|number|Number|The value, usually fractional, to be rounded.| 
 +\\  
 +**Return value type:**  Number
  
-=== See also === +\\  
-  * [[syntax:functions:ceiling]] +=====Remarks===== 
-  * [[syntax:functions:floor]] +If the argument provided has //any// decimal portion, the whole number will be rounded down (towards negative infinity) to the next nearest whole number.
-  * [[syntax:functions:truncate]]+
  
 +\\ 
 +=====Examples=====
 +
 +  floor(10.0001) //Returns 10
 +
 +  floor(10.5) //Returns 10
 +
 +  floor(10.9999) //Returns 10
 +
 +  floor(-10.0001) //Returns -11  (Rounded down towards negative infinity)
 +
 +  floor(-10.5) //Returns -11  (Rounded down towards negative infinity)
 +
 +  floor(-10.9999) //Returns -11  (Rounded down towards negative infinity)
 +
 +\\ 
 +===== See also =====
 +  * [[syntax:functions:ceiling|Ceiling(number)]]
 +  * [[syntax:functions:truncate|Truncate(number)]]
  
syntax/functions/floor.txt · Last modified: 2021/08/11 15:17 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki