set method

Vector2D set(
  1. num x,
  2. num y
)

Sets all components at once.

Values are converted using num.toDouble.

Implementation

Vector2D set(num x, num y) {
  this.x = x.toDouble();
  this.y = y.toDouble();
  return this;
}