starlit  Diff

Differences From Artifact [65dcc21fc6]:

To Artifact [3b6ca155c9]:


     1      1   local lib = ...
     2      2   local fn = {}
     3      3   
     4      4   fn.vsep = function(vec) -- separate a vector into a direction + magnitude
     5      5   	return vec:normalize(), vec:length()
     6      6   end
     7      7   
     8         --- minetest now only provides the version of this function that sqrts the result
            8  +-- luanti now only provides the version of this function that sqrts the result
     9      9   -- which is pointlessly wasteful much of the time
    10     10   fn.vdsq = function(a,b)
    11     11   	local d = vector.subtract(a,b)
    12     12   	return (d.x ^ 2) + (d.y ^ 2) + (d.z ^ 2)
    13     13   end
    14     14   
    15     15   fn.vdcomp = function(dist,v1,v2) -- compare the distance between two points