Issue Description
In the description of the __lt
metamethod it is stated that >=
will invoke __lt
and invert the result:
Note: Using the >= greater than or equal to operator will invoke this metamethod and return the opposite of what this returns, as greater than or equal to is the same as not less than.
and in the description of the __le
metamethod it is stated that >
will invoke __le
and invert the result:
Note: Using the > greater than operator will invoke this metamethod and return the opposite of what this returns, as greater than is the same as not less than or equal to.
This is not how >
and >=
work with overloaded comparison operators. >
will reverse the order of its input and call __lt
(a>b
β b<a
), and >=
will do the same thing but with __le
(a>=b
β b<=a
). If no __le
metamethod is present, <=
and >=
will fall back to calling __lt
(a<=b
β not(b<a)
, a>=b
β not(a<b)
).
Issue Area: Documentation Content
Page URL: Metatables | Roblox Creator Documentation