SHIP:Sail:ltoi

From Serious Documentation
Revision as of 14:04, 29 September 2016 by CarltonHeyer (talk | contribs) (Created page with "__NOTOC__ {{SailFuncTableStart|}}<onlyinclude> |{{SailFunc|ltoi}}||{{DataType|Integer}}||style="text-align:center;"|v5.1.0||Explicitly casts an {{DataType|Long}} to an {{DataT...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function Returns Introduced Description
ltoi Integer v5.1.0 Explicitly casts an Long to an Integer Badge SHIPv5.gif

See Also:

Prototype

Integer ltoi(Long n);

Parameters/Return Value

Parameter Data Type Description
n Long the number to cast
Return Integer the integer version of the supplied number

Detailed Description

The ltoi() function explicitly casts the supplied Long to an Integer. You may want to use this in mathematical expressions around items to reduce precision and memory usage.

Examples

Example Result Notes
ltoi(-5); -5
ltoi(5); 5