do
local oldSin = math.sin
local degToRad = math.pi / 180
math.sin = function (x)
return oldSin(x * degToRad)
end
end
print("sin 30 = " .. math.sin(30))
Sunday, May 13, 2012
function을 redefine하는 예
Labels:
Lua
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment