distance static method

double distance(
  1. Point a,
  2. Point b
)

The distance between points a and b.

Implementation

static double distance(Point a, Point b) {
  final double x = (a.x - b.x);
  final double y = (a.y - b.y);
  return math.sqrt((x * x) + (y * y));
}