translatePoints function

List<Point<num>> translatePoints(
  1. List<Point<num>> points,
  2. num x,
  3. num y
)

Translate pints in x and y.

Implementation

List<Point<num>> translatePoints(List<Point<num>> points, num x, num y) {
  return points.map((p) => Point(p.x + x, p.y + y)).toList();
}