Sample C code to find distance between two points on a single coordinate system, in the form:
point1 = (X
1,Y
1)
point2 = (X
2,Y
2)
#include <
math.h>
distance =
sqrt( pow((X
2 - X
1),2) + pow((Y
2 - Y
1),2) )
Note that this is only effective for two dimentional coordinate systems, though can be easilly modified to accomodate more.