SHIP:Sail:dtof

From Serious Documentation
Jump to: navigation, search
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