Scheme Exercises
back to exercise list
previous next
Group: Exercise: 10/48
Distance:
Calculate the distance between two coordinates.
Write a function called "distance" that when given the points (x1,y1) (x2,y2) it will calculate the Euclidean distance between them. (That means use the distance formula) The order of the parameters should be x1 y1 x2 y2. (distance 1 2 4 6) --> 5 (distance 0 0 3 4) --> 5
|