Difference between revisions of "SHIP:Sail:floor"

From Serious Documentation
Jump to: navigation, search
Line 38: Line 38:
 
|<code>{{SailFunc|floor}}(5.2f);</code> || 5 ||
 
|<code>{{SailFunc|floor}}(5.2f);</code> || 5 ||
 
|}
 
|}
 +
 +
[[Categories: Numeric Functions]]

Revision as of 14:34, 4 October 2016

Function Returns Introduced Description
floor Integer v5.0 Gets the largest integer less than or equal to a number Badge SHIPv5.gif

See Also

Prototype

Integer floor(Float n);

Parameters/Return Value

Parameter Data Type Description
n 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

Categories: Numeric Functions