projectPoint function

List<double> projectPoint(
  1. double x0,
  2. double y0,
  3. double angle,
  4. double distance,
)

Move a point in an angle by a distance.

Implementation

List<double> projectPoint(
        double x0, double y0, double angle, double distance) =>
    [cos(angle) * distance + x0, sin(angle) * distance + y0];