aboutsummaryrefslogtreecommitdiff
path: root/builtin/misc.lua
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-07-07 12:02:11 -0400
committerkwolekr <kwolekr@minetest.net>2013-07-07 21:47:38 -0400
commita75afb85ca6338da847172bbed3cc776d3aced20 (patch)
tree2f02ef8ea34c6ea30df1ddbc391c792f1c59cbd6 /builtin/misc.lua
parent9dcd21911a438fbec5b5aa8cc1f5bb1975a1b98f (diff)
downloadminetest-a75afb85ca6338da847172bbed3cc776d3aced20.tar.gz
minetest-a75afb85ca6338da847172bbed3cc776d3aced20.tar.bz2
minetest-a75afb85ca6338da847172bbed3cc776d3aced20.zip
Move math.hypot() to misc_helpers.lua and fix zero-division error
Diffstat (limited to 'builtin/misc.lua')
-rw-r--r--builtin/misc.lua10
1 files changed, 0 insertions, 10 deletions
diff --git a/builtin/misc.lua b/builtin/misc.lua
index 4be03c38a..f4e7dbca6 100644
--- a/builtin/misc.lua
+++ b/builtin/misc.lua
@@ -106,13 +106,3 @@ function minetest.formspec_escape(str)
return str
end
-function math.hypot(x, y)
- local t
- x = math.abs(x)
- y = math.abs(y)
- t = math.min(x, y)
- x = math.max(x, y)
- t = t / x
- return x * math.sqrt(1 + t * t)
-end
-