Difference between revisions of "Ceil"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>ceil</c> Returns the "ceiling", i.e. closest whole number greater than or equal to the given number. See also: floor === Arguments === {| class="wikitable" |- ! Para...")
 
m
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
greater than or equal to the given number.
 
greater than or equal to the given number.
  
See also: [[floor]]
+
See also: [[floor]], [[round]]
 +
 
 
=== Arguments ===
 
=== Arguments ===
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Parameter Name !! Default Value !! Meaning
+
! Parameter Name !! Type !! Meaning
 
|-
 
|-
 
| ''x'' || number, default 0 || number to get the ceiling of
 
| ''x'' || number, default 0 || number to get the ceiling of
 
|}
 
|}
 +
 
== Example ==
 
== Example ==
  

Latest revision as of 15:13, 25 March 2022

ceil Returns the "ceiling", i.e. closest whole number greater than or equal to the given number.

See also: floor, round

Arguments

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

Example

ceil(41.2)      // returns 42