angleBetweenPoints static method

double angleBetweenPoints(
  1. Vector2 p1,
  2. Vector2 p2
)

Implementation

static double angleBetweenPoints(Vector2 p1, Vector2 p2) {
  return atan2(p2.y - p1.y, p2.x - p1.x);
}