set method

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

Sets all components at once.

Values are converted using num.toDouble, truncating any fractional part.

Returns this instance for fluent chaining.

Implementation

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