Script for calculating distance between two points.