Difference between revisions of "Floor"

From MiniScript Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<c>floor</c> Returns the "floor", i.e. closest whole number less than or equal to the given number.
 
<c>floor</c> Returns the "floor", i.e. closest whole number less than or equal to the given number.
 +
 +
See also: [[ceil]], [[round]]
  
 
=== Arguments ===
 
=== Arguments ===
Line 5: Line 7:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Parameter Name !! Default Value !! Meaning
+
! Parameter Name !! Type !! Meaning
 
|-
 
|-
 
| ''x'' || number, default 0 || number to get the floor of
 
| ''x'' || number, default 0 || number to get the floor of

Latest revision as of 15:13, 25 March 2022

floor Returns the "floor", i.e. closest whole number less than or equal to the given number.

See also: ceil, round

Arguments

Parameter Name Type Meaning
x number, default 0 number to get the floor of

Example

floor(42.9)     // returns 42