angle static method

double angle(
  1. Offset point1,
  2. Offset point2
)

Calculates the angle between two points in radians.

point1 is the first point. point2 is the second point.

Implementation

static double angle(Offset point1, Offset point2) {
  return math.atan2(point2.dy - point1.dy, point2.dx - point1.dx);
}