Difference between revisions of "SHIP:Sail:dtof"

From Serious Documentation
Jump to: navigation, search
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|dtof}}||{{DataType|Integer}}||style="text-align:center;"|v5.1.0||Explicitly casts an {{DataType|Double}} to a {{DataType|Float}} {{v5}}</onlyinclude>
+
|{{SailFunc|dtof}}||{{DataType|Integer}}||style="text-align:center;"|v5.1.0||Explicitly casts an {{DataType|Double}} to a {{DataType|Float}}</onlyinclude>
 
|}
 
|}
 
== See Also: ==
 
== See Also: ==

Latest revision as of 17:02, 13 October 2016

Function Returns Introduced Description
dtof Integer v5.1.0 Explicitly casts an Double to a Float

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 where precision can be reduced.


Examples

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