getCenter method

Vector3 getCenter(
  1. Vector3 target
)

Implementation

Vector3 getCenter(Vector3 target) {
  if (isEmpty()) {
    target.setValues(0, 0, 0);
  } else {
    target.add2(min, max).scale(0.5);
  }

  return target;
}