Difference between revisions of "SHIP:Sail:ftod"

From Serious Documentation
Jump to: navigation, search
(Created page with "__NOTOC__ {{SailFuncTableStart|}}<onlyinclude> |{{SailFunc|ftod}}||{{DataType|Integer}}||style="text-align:center;"|v5.1.0||Explicitly casts an {{DataType|Float}} to a {{DataT...")
 
Line 40: Line 40:
 
|<code>{{SailFunc|ftod}}(5);</code> || 5.0 ||
 
|<code>{{SailFunc|ftod}}(5);</code> || 5.0 ||
 
|}
 
|}
 +
 +
[[Category:Numeric Functions]]

Revision as of 15:02, 10 October 2016

Function Returns Introduced Description
ftod Integer v5.1.0 Explicitly casts an Float to a Double Badge SHIPv5.gif

See Also:

Prototype

Double dtof(Float n);

Parameters/Return Value

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

Detailed Description

The dtof() function explicitly casts the supplied Float to an Double. You may want to use this in mathematical expressions around items where precision needs to be increased.


Examples

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