Float

From SA-MP Wiki

Jump to: navigation, search

float

Image:Farm-Fresh text lowercase.png Note: This function name starts with a lowercase letter.


Description:

Converts an integer into a float.


Parameters:
(value)
valueInteger value to convert to a float


Return Values:

The given integer as a float


Example Usage:

new Float:FloatValue;
new Value = 52;
FloatValue = float(Value);   // Converts Value(52) into a float and stores it in 'FloatValue' (52.0)

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

  • floatround: Convert a float to an integer (rounding).
  • floatstr: Convert an string to a float.
Personal tools
In other languages