Skip to content

isfinite

math.isfinite(x)

Checks if a number is finite (not infinity and not NaN).

ParameterTypeRequiredDescription
xnumberYesThe number to check.
TypeDescription
booleantrue if the number is finite, false otherwise.
math.isfinite(101969285) -- true
math.isfinite(math.huge) -- false