roundToZero method

  1. @override
Vector2 roundToZero()
override

Implementation

@override
Vector2 roundToZero() {
  x = (x < 0) ? x.ceilToDouble() : x.floorToDouble();
  y = (y < 0) ? y.ceilToDouble() : y.floorToDouble();

  return this;
}