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 [2019/09/26 11:27] dmitrysyntax:functions:floor [2021/08/11 15:17] (current) – [Examples] craigt
Line 1: Line 1:
-===== Floor(number) =====+====== Floor(number) =====
 +Category:  Number function
  
-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( 0 - 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===== 
 +If the argument provided has //any// decimal portion, the whole number will be rounded down (towards negative infinity) to the next nearest whole number. 
 + 
 +\\  
 +=====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)]]
  
-Note: keep in mind that EasyMorph doesn't support unary minus in expressions - see Example 1 above. 
syntax/functions/floor.1569511624.txt.gz · Last modified: 2019/09/26 11:27 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki