lua-prog-book/lib1.lua

9 lines
101 B
Lua

function norm (x, y)
return math.sqrt(x^2 + y^2)
end
function twice (x)
return 2.0 * x
end