Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (8 sloc) 218 Bytes
def distanceSquaredBetweenPoints(p1, p2)
deltaX = p1.x - p2.x
deltaY = p1.y - p2.y
(deltaX * deltaX) - (deltaY * deltaY)
end
def distanceBetweenPoints(p1, p2)
Math.sqrt distanceSquaredBetweenPoints(p1, p2)
end
Jump to Line
Something went wrong with that request. Please try again.