SHIP:Sail:dtof

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

See Also:

Prototype

Float dtof(Double n);

Parameters/Return Value

Parameter Data Type Description
n Double the number to cast
Return Float the floating point version of the supplied number

Detailed Description

The dtof() function explicitly casts the supplied Double to an Float. You may want to use this in mathematical expressions around items so that the expression evaluation is moved into the floating point domain. For example:


Examples

Example Result Notes
dtof(-5); -5.0
dtof(5); 5.0