Browse Source

Vector3: Added angleTo optimisation back. See #7343.

Mr.doob 9 years ago
parent
commit
3ab66975b6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/math/Vector3.js

+ 1 - 1
src/math/Vector3.js

@@ -655,7 +655,7 @@ THREE.Vector3.prototype = {
 
 	angleTo: function ( v ) {
 
-		var theta = this.dot( v ) / ( this.length() * v.length() );
+		var theta = this.dot( v ) / ( Math.sqrt( this.lengthSq() * v.lengthSq() ) );
 
 		// clamp, to handle numerical problems