getAngle function

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

Get an angle (radians) between two points.

Implementation

double getAngle(double x0, double y0, double x1, double y1) =>
    atan2(y1 - y0, x1 - x0);