getCenter method

Vector3 getCenter(
  1. Vector3 target
)

target — the result will be copied into this Vector3.

Returns the center of the line segment.

Implementation

Vector3 getCenter(Vector3 target) {
  return target.add2(start, end).scale(0.5);
}