!--------------- Copy this to the beginning of a lua script to use the functions ---------------!

-- Initialises the random number generator
randinit = false
function randInit()

if not randinit then
math.randomseed(os.clock())
randinit = true
end

end


-- Returns the distance between (x1,x2,x3) and (y1,y2,y3)
function dist( x1,x2,x3, y1,y2,y3 )
return math.sqrt( (x1-y1)^2 + (x2-y2)^2 + (x3-y3)^2 )
end