note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
floatcmp
warning
This function starts with a lowercase letter.
Description
floatcmp can be used to compare float values to each other, to validate the comparison.
Name | Description |
---|---|
Float:oper1 | The first float value to compare. |
Float:oper2 | The second float value to compare. |
Returns
0 if value does match, 1 if the first value is bigger and -1 if the 2nd value is bigger.
Examples
new value;
value = floatcmp(2.0, 2.0); // Returns 0 because they match.
value = floatcmp(1.0, 2.0); // Returns -1 because the second value is bigger.
value = floatcmp(2.0, 1.0); // Returns 1 because the first value is bigger.