translate method

Position translate(
  1. Position p,
  2. Position size
)

Implementation

Position translate(Position p, Position size) {
  return p.clone().minus(
      Position(size.x * relativePosition.dx, size.y * relativePosition.dy));
}