roundToZero method

  1. @override
Vector4 roundToZero()
override

Implementation

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

  return this;
}