Walter Bright wrote:
double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; 1; a.next, b.next) { if (a.empty) { enforce(b.empty); break; } enforce(!b.empty); auto t = a.head - b.head; result += t * t; if (result >= limit) break; } return sqrt(result); }
Gotta give it to The Man! So after all I couldn't find a good use for goto. Andrei