setPosition method

void setPosition(
  1. double x,
  2. double y
)

Implementation

void setPosition(double x, double y) {
  before_xPos = xPos;
  before_yPos = yPos;
  xPos = x;
  yPos = y;
}