Compute distance between two point.
计算两点间的距离。
static distance(Vector2 p1, Vector2 p2) { return math.sqrt( math.pow((p1.x) - (p2.x), 2) + math.pow((p1.y) - (p2.y), 2), ); }