SHIP:Sail:round

From Serious Documentation
Revision as of 06:19, 22 June 2014 by TerryW-Serious (talk | contribs) (Created page with "__NOTOC__ {{SailFuncTableStart|}}<onlyinclude> |{{SailFunc|round}}||{{DataType|Integer}}||1||Gets the nearest integer to a number</onlyinclude> |} == See Also: == *[[SHIP:Sail...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function Returns Introduced Description
round Integer 1 Gets the nearest integer to a number

See Also:

Prototype

Integer round(Float n);

Parameters/Return Value

Parameter Data Type Description
n Float the number to find the rounded value of
Return Integer the rounded value of the supplied number

Detailed Description

The round() function returns the nearest integer to a number.

Examples

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