MCPcopy
hub / github.com/mrdoob/three.js / getCenter

Method getCenter

src/math/Box3.js:224–228  ·  view source on GitHub ↗

* Returns the center point of this box. * * @param {Vector3} target - The target vector that is used to store the method's result. * @return {Vector3} The center point.

( target )

Source from the content-addressed store, hash-verified

222 * @return {Vector3} The center point.
223 */
224 getCenter( target ) {
225
226 return this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );
227
228 }
229
230 /**
231 * Returns the dimensions of this box.

Callers 5

houseSceneFunction · 0.95
constructorMethod · 0.95
intersectsTriangleMethod · 0.95
getBoundingSphereMethod · 0.95
computeBoundsFunction · 0.95

Calls 4

isEmptyMethod · 0.95
setMethod · 0.45
multiplyScalarMethod · 0.45
addVectorsMethod · 0.45

Tested by

no test coverage detected