pointAt function

Point pointAt(
  1. Point origin,
  2. double distance,
  3. double angle
)

Returns the point at a given distance and angle from an origin.

Implementation

Point pointAt(Point origin, double distance, double angle) {
  return Point(
    origin.x + distance * math.cos(angle),
    origin.y + distance * math.sin(angle),
  );
}