Lua operators

From wikinotes
Revision as of 21:07, 11 February 2024 by Will (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation

operator overloading metatable keys https://www.lua.org/manual/5.4/manual.html#2.4

Operator Overloading

Every object type in lua has a lua metatable.
The metatable can define custom methods like __add to perform addition. Here's a list of operator overloading methods