A simple algorithm that calculates the distance between two three-dimensional or two-dimensional vectors.