Files
luaj/src/test/res/math.lua
Ian Farmer e1d6ddf99c New autoload and math test cases. Currently autoload does not work because
the GETGLOBAL instruction does not handle the case where a metatable method
is invoked.
2007-07-21 04:44:22 +00:00

8 lines
151 B
Lua

local mathClass = luajava.bindClass("java.lang.Math")
local function sqrt(x)
return mathClass:sqrt(x)
end
return { sqrt = sqrt; pi = mathClass.PI }