math.lua 297 B

123456789101112
  1. assert(math.fmod(13.5, 2) == 1.5)
  2. assert(math.pow(7, 2) == 49)
  3. local ok, msg = pcall(function()
  4. math.max()
  5. end)
  6. assert(not ok and string.find(msg, "wrong number of arguments"))
  7. local ok, msg = pcall(function()
  8. math.min()
  9. end)
  10. assert(not ok and string.find(msg, "wrong number of arguments"))