Reference › Function reference › Conditions

Conditions.spatial.finite

dependency

Call as

Conditions.spatial.finite(value)

Record the dependency Conditions.spatial.finite, 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

True when value is a number that is neither NaN nor infinite.

Arguments

NameTypeWhat it does
valueanyValue to check.

Returns

1booleanTrue when the value passes the check.

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

  • Distance Count (valid)
    return finite(value.value) and value.value >= 0 and

Source

Conditions/spatial.lua, line 61. Read only in game; Duplicate makes an editable copy.

Conditions.spatial.finite(value)
 return type(value)=="number" and value==value and value>-math.huge and value<math.huge

Back to Function reference