static double pointDistance(Pt a, Pt b) { ret sqrt(sqr(a.x-b.x) + sqr(a.y-b.y)); } static double pointDistance(double x1, double y1, double x2, double y2) { ret sqrt(sqr(x1-x2) + sqr(y1-y2)); } ifclass DoublePt static double pointDistance(DoublePt a, DoublePt b) { ret pointDistance(a.x, a.y, b.x, b.y); } endif