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

Method distanceTo

src/math/Vector3.js:953–957  ·  view source on GitHub ↗

* Computes the distance from the given vector to this instance. * * @param {Vector3} v - The vector to compute the distance to. * @return {number} The distance.

( v )

Source from the content-addressed store, hash-verified

951 * @return {number} The distance.
952 */
953 distanceTo( v ) {
954
955 return Math.sqrt( this.distanceToSquared( v ) );
956
957 }
958
959 /**
960 * Computes the squared distance from the given vector to this instance.

Callers 15

raycastWorldUnitsFunction · 0.95
raycastWorldUnitsFunction · 0.95
buildFacesFunction · 0.95
Vector2.tests.jsFile · 0.45
Vector3.tests.jsFile · 0.45
Triangle.tests.jsFile · 0.45
Ray.tests.jsFile · 0.45
Line3.tests.jsFile · 0.45
compareBoxFunction · 0.45
comparePlaneFunction · 0.45
Editor.jsFile · 0.45

Calls 1

distanceToSquaredMethod · 0.95

Tested by

no test coverage detected