Reference › Function reference › Platform

Platform.glyphs.integer

dependency

Call as

Platform.glyphs.integer(value, minimum)

Record the dependency Platform.glyphs.integer, 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

Returns true when value is a finite whole number no smaller than minimum, and false for anything else (including NaN and infinity).

Arguments

NameTypeWhat it does
valueanyValue to test.
minimumnumberSmallest accepted value.

Returns

1booleanTrue when value is an integer of at least minimum.

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

Source

Platform/glyphs.lua, line 16. Read only in game; Duplicate makes an editable copy.

Platform.glyphs.integer(value, minimum)
    return type(value)=='number' and value==value and value>=minimum and value<math.huge and value%1==0

Back to Function reference