$e1.isFloatGreater(e2, $precision)
Determines whether the floating point number e1 is greater than the floating point number e2, when rounding to precision digits.
The expression is equivalent to
$e1.round($precision) > $e2.round($precision)
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| e1 | Number | A floating point number to be compared with e2. |
yes | |
| e2 | Number | A floating point number to be compared to e1. |
yes | |
| precision | Number | A number that specifies how many decimal places to include. | yes |
Type: Boolean
true, if e1 is greater than e2.
3.1314.isFloatGreater(3.1311, 4)
Output: true
3.1314.isFloatGreater(3.1351, 2)
Output: false
By the given precision = 2 the numbers 3.14 and 3.14 are compared to each other, which are the same.