float()
Description
Convert integer to floating point
Syntax
float(value);
Parameters
Variable | Input |
|---|---|
| Input value |
Returns
A floating point number with the integer value of the parameter.
Function call example
Example of converting to float type number
new dist;
new Float:convToFloat;
main()
{
dist = get_val(Sensor_Distance);
convToFloat = float(dist);
while(1)
{
Delay(100);
}
}