mirror of
https://github.com/appgurueu/modlib.git
synced 2024-08-19 04:44:11 +02:00
func: Complete operators
This commit is contained in:
parent
b8560d7e62
commit
2bbcbee1c4
8
func.lua
8
func.lua
@ -75,6 +75,8 @@ end
|
|||||||
|
|
||||||
function add(a, b) return a + b end
|
function add(a, b) return a + b end
|
||||||
|
|
||||||
|
function sub(a, b) return a - b end
|
||||||
|
|
||||||
function mul(a, b) return a * b end
|
function mul(a, b) return a * b end
|
||||||
|
|
||||||
function div(a, b) return a / b end
|
function div(a, b) return a / b end
|
||||||
@ -91,10 +93,16 @@ function len(a) return #a end
|
|||||||
|
|
||||||
function eq(a, b) return a == b end
|
function eq(a, b) return a == b end
|
||||||
|
|
||||||
|
function neq(a, b) return a ~= b end
|
||||||
|
|
||||||
function lt(a, b) return a < b end
|
function lt(a, b) return a < b end
|
||||||
|
|
||||||
|
function gt(a, b) return a > b end
|
||||||
|
|
||||||
function le(a, b) return a <= b end
|
function le(a, b) return a <= b end
|
||||||
|
|
||||||
|
function ge(a, b) return a >= b end
|
||||||
|
|
||||||
function index(object, key) return object[key] end
|
function index(object, key) return object[key] end
|
||||||
|
|
||||||
function newindex(object, key, value) object[key] = value end
|
function newindex(object, key, value) object[key] = value end
|
||||||
|
Loading…
Reference in New Issue
Block a user