function.lua 234 B

123456789
  1. function ptrng(v1,v2)
  2. return math.sqrt((v1^2)+(v2^2))
  3. end
  4. for i=0,10,1 do
  5. a=math.floor(math.random(100));b=math.floor(math.random(100))
  6. print("ptrng("..tostring(a)..","..tostring(b)..")="..tostring(ptrng(a,b)))
  7. end