]> git.lizzy.rs Git - minetest.git/blobdiff - builtin/misc.lua
Fix parseColor, change remaining colorkeys to new format, fix Contributor list
[minetest.git] / builtin / misc.lua
index f4e7dbca655ff2af500e56560d74fe5366abbade..4be03c38a302f59c9ef43e793264f8225bf6a369 100644 (file)
@@ -106,3 +106,13 @@ 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
+