translate method

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

Translates this Vector2 by x and y.

Implementation

void translate(double x, double y) {
  setValues(this.x + x, this.y + y);
}