aboutsummaryrefslogtreecommitdiff
path: root/textures/base/pack/server_flags_pvp.png
diff options
context:
space:
mode:
authorAndrii Muliar <andrew.muliar@gmail.com>2020-06-22 15:22:07 +0000
committersfan5 <sfan5@live.de>2020-07-08 22:51:18 +0200
commit822fdb60bce5c804a8c8d36adf7d8372ca383213 (patch)
treed0479cb60aa6464dac914ead132c8097044ed76d /textures/base/pack/server_flags_pvp.png
parent6a58fc0e3cd5ae8d0da7fccf4253f1eee6b0f1c0 (diff)
downloadminetest-822fdb60bce5c804a8c8d36adf7d8372ca383213.tar.gz
minetest-822fdb60bce5c804a8c8d36adf7d8372ca383213.tar.bz2
minetest-822fdb60bce5c804a8c8d36adf7d8372ca383213.zip
Translated using Weblate (Ukrainian)
Currently translated at 42.0% (568 of 1350 strings)
Diffstat (limited to 'textures/base/pack/server_flags_pvp.png')
0 files changed, 0 insertions, 0 deletions
s="hl kwa">function vector.new(a, b, c) if type(a) == "table" then assert(a.x and a.y and a.z, "Invalid vector passed to vector.new()") return {x=a.x, y=a.y, z=a.z} elseif a then assert(b and c, "Invalid arguments for vector.new()") return {x=a, y=b, z=c} end return {x=0, y=0, z=0} end function vector.equals(a, b) return a.x == b.x and a.y == b.y and a.z == b.z end function vector.length(v) return math.hypot(v.x, math.hypot(v.y, v.z)) end function vector.normalize(v) local len = vector.length(v) if len == 0 then return {x=0, y=0, z=0} else return vector.divide(v, len) end end function vector.round(v) return { x = math.floor(v.x + 0.5), y = math.floor(v.y + 0.5), z = math.floor(v.z + 0.5) } end function vector.distance(a, b) local x = a.x - b.x local y = a.y - b.y local z = a.z - b.z return math.hypot(x, math.hypot(y, z)) end function vector.direction(pos1, pos2) local x_raw = pos2.x - pos1.x local y_raw = pos2.y - pos1.y local z_raw = pos2.z - pos1.z local x_abs = math.abs(x_raw) local y_abs = math.abs(y_raw) local z_abs = math.abs(z_raw) if x_abs >= y_abs and x_abs >= z_abs then y_raw = y_raw * (1 / x_abs) z_raw = z_raw * (1 / x_abs) x_raw = x_raw / x_abs end if y_abs >= x_abs and