setFromCenterAndSize method

Box2 setFromCenterAndSize(
  1. Vector2 center,
  2. Vector2 size
)

Implementation

Box2 setFromCenterAndSize(Vector2 center, Vector2 size) {
  var halfSize = _vector.copy(size).multiplyScalar(0.5);
  min.copy(center).sub(halfSize);
  max.copy(center).add(halfSize);

  return this;
}