translated method

Vector2 translated(
  1. double x,
  2. double y
)

Creates a new Vector2 that is the current Vector2 translated by x and y.

Implementation

Vector2 translated(double x, double y) {
  return Vector2(this.x + x, this.y + y);
}