Difference between revisions of "SHIP:Sail:floor"

From Serious Documentation
Jump to: navigation, search
(ceil)
Line 4: Line 4:
 
*[[SHIP:Sail:Functions|SHIP Sail Function Home]]
 
*[[SHIP:Sail:Functions|SHIP Sail Function Home]]
 
*{{SailFunc|abs}}, {{SailFunc|ceil}}, {{SailFunc|floor}}, {{SailFunc|ftoi}}, {{SailFunc|itof}}, {{SailFunc|max}}, {{SailFunc|min}}, {{SailFunc|round}}
 
*{{SailFunc|abs}}, {{SailFunc|ceil}}, {{SailFunc|floor}}, {{SailFunc|ftoi}}, {{SailFunc|itof}}, {{SailFunc|max}}, {{SailFunc|min}}, {{SailFunc|round}}
== ceil==
+
== {{SailFunc|floor}} ==
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
 
|{{SailFunc|floor}}||{{DataType|Integer}}||1||Gets the largest integer less than or equal to a number</onlyinclude>
 
|{{SailFunc|floor}}||{{DataType|Integer}}||1||Gets the largest integer less than or equal to a number</onlyinclude>

Revision as of 06:11, 22 June 2014

See Also:

floor

Function Returns Introduced Description
floor Integer 1 Gets the largest integer less than or equal to a number

Prototype

Integer floor(Float n);

Parameters/Return Value

Parameter Data Type Description
n Integer/Float the number to find the floor value of
Return Integer the floor (lower) of the supplied number

Detailed Description

The floor() function returns the returns the largest integer less than or equal to a number. If you visualize a number line, floor() goes to the integer to the left.

Examples

Example Result Notes
floor(-5.1f); -6
floor(5.2f); 5