angleBetween function

double angleBetween(
  1. Point from,
  2. Point to
)

Calculates the angle between two points.

Implementation

double angleBetween(Point from, Point to) {
  return math.atan2(to.y - from.y, to.x - from.x);
}