mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-26 05:09:02 -06:00
Added bigint comparison metamethods
This commit is contained in:
parent
cbdbfa6633
commit
f5121b62e5
@ -32,6 +32,15 @@ local mt = {
|
|||||||
end,
|
end,
|
||||||
__tostring = function()
|
__tostring = function()
|
||||||
return bigint.unserialize(self, "s")
|
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
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user