getDistance function

double getDistance(
  1. double x0,
  2. double y0,
  3. double x1,
  4. double y1,
)

Get the distance between two points.

Implementation

double getDistance(double x0, double y0, double x1, double y1) =>
    sqrt(pow(y1 - y0, 2) + pow(x1 - x0, 2));