Floatsqroot
From SA-MP Wiki
floatsqroot
Note: This function name starts with a lowercase letter. |
Description:
Calculates the square root of given value.
(Float:value)
value | The value to calculate the square root of. |
Return Values:
The square root of the input value, as a float.
Note | This function raises a “domain” error if the input value is negative. You may use floatabs to get the absolute (positive) value. |
Example Usage:
floatsqroot(25.0); // Returns 5, because 5x5 = 25
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- floatpower: Raises given value to a power of exponent.
- floatlog: Get the logarithm of the float value.