zombiesurvival-evolved/gamemodes/zombiesurvival/gamemode/obj_vector_extend.lua

7 lines
204 B
Lua
Raw Normal View History

2014-10-02 08:49:54 +08:00
local meta = FindMetaTable("Vector")
if not meta then return end
function meta:DistanceZSkew(vec, skew)
return math.sqrt((self.x - vec.x) ^ 2 + (self.y - vec.y) ^ 2 + ((self.z - vec.z) * skew) ^ 2)
end