Skip to content

Conversation

@yl-whosit
Copy link
Contributor

@yl-whosit yl-whosit commented Jan 6, 2026

Very simple utility function present in many languages working with floats.

math.isfinite(n) returns true if n is not an infinite number (math.huge or -math.huge) and not a NaN.

Can probably be implemented using standard C++ function:
https://en.cppreference.com/w/c/numeric/math/isfinite
not sure if that would be better, or this is good enough.

UPD: (please squash this if you decide to merge :p)

@cx384 cx384 added @ Script API Feature ✨ PRs that add or enhance a feature Roadmap: Needs approval The change is not part of the current roadmap and needs to be approved by coredevs beforehand labels Jan 6, 2026
Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is useful especially given that finite numbers are something the engine frequently requires.

(btw: implementing this in C++ would be more complex and most certainly less efficient given LuaJIT.)

@appgurueu appgurueu added One approval ✅ ◻️ and removed Roadmap: Needs approval The change is not part of the current roadmap and needs to be approved by coredevs beforehand labels Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants