diff --git a/libs/bigint/bigint.lua b/libs/bigint/bigint.lua index 3f6e18f..aced005 100644 --- a/libs/bigint/bigint.lua +++ b/libs/bigint/bigint.lua @@ -32,6 +32,15 @@ local mt = { end, __tostring = function() return bigint.unserialize(self, "s") + end, + __eq = function(lhs, rhs) + return bigint.compare(lhs, rhs, "==") + end, + __lt = function(lhs, rhs) + return bigint.compare(lhs, rhs, "<") + end, + __le = function(lhs, rhs) + return bigint.compare(lhs, rhs, "<=") end }