Call as
Conditions.encounter_state.validNumber(value)
Record the dependency Conditions.encounter_state.validNumber, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.
What it does
Checks that a value is a finite number of zero or more (not NaN, not infinite).
Arguments
| Name | Type | What it does |
|---|---|---|
value | any | The value to test. |
Returns
| 1 | boolean | True for a finite, non-negative number. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
It reads no game API directly.
How the addon calls it
Conditions.encounter_state.validComparereturn value.operator ~= nil and Functions.values.isin(addon.operators, value.operator) and validNumber(value.value)
Source
Conditions/encounter_state.lua, line 43. Read only in game; Duplicate makes an editable copy.
Conditions.encounter_state.validNumber(value)
return type(value) == "number" and value == value and value >= 0 and value < math.huge