distance function
Calculates the euclidian distance between two vec2's
@param {ReadonlyVec2} a the first operand @param {ReadonlyVec2} b the second operand @returns {Number} distance between a and b
Implementation
double distance(List<double> a, List<double> b) {
var x = b[0] - a[0], y = b[1] - a[1];
return hypot([x, y]);
}