mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-17 12:31:04 +01:00
added lua interpreter support for custom math functions
This commit is contained in:
12
go/test.lua
Normal file
12
go/test.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
function add(a,b)
|
||||
return a + b
|
||||
end
|
||||
|
||||
function parallelresistance(a,b)
|
||||
return 1.0 / (a * b)
|
||||
end
|
||||
|
||||
function init()
|
||||
RegisterFuncTwoArg("add")
|
||||
RegisterFuncTwoArg("parallelresistance")
|
||||
end
|
||||
Reference in New Issue
Block a user