@@ -160,8 +160,7 @@ class Box2 {
distanceToPoint( point ) {
- const clampedPoint = _vector.copy( point ).clamp( this.min, this.max );
- return clampedPoint.sub( point ).length();
+ return this.clampPoint( point, _vector ).distanceTo( point );
}
@@ -396,9 +396,7 @@ class Box3 {
-