FloatToString(float, int, int)

Converts a float into a string.

string FloatToString(
    float fFloat,
    int nWidth = 18,
    int nDecimals = 9
);

Parameters

fFloat

The float to convert into a string.

nWidth

The number of numeric positions to the left of the decimal. If zero, the whole part left of the decimal is displayed without trailing spaces. (Default: 18)

nDecimals

The number of numeric positions to the right of the decimal (precision). (Default: 9)


Description

Returns the value of fFloat converted to a string within the confines defined by nWidth and nDecimals.
Returns an empty string ("") on error.



Version

1.22

See Also

functions: FloatToInt | LocationToString | StringToFloat | StringToInt | VectorToString
categories: Type Casting/Conversion Functions


 author: Charles Feduke, editor: Jochem van 't Hull