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
Last revisionBoth sides next revision
syntax:functions:floor [2019/09/26 11:27] dmitrysyntax:functions:floor [2021/07/31 20:51] 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) = 10 
 +  floor(10.5) = 10 
 +  floor(10.9999) = 10 
 +  floor(-10.0001) = -11  //Rounded down towards negative infinity 
 +  floor(-10.5) = -11  //Rounded down towards negative infinity 
 +  floor(-10.9999) = -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.txt · Last modified: 2021/08/11 15:17 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki