Skip to content

Commit

Permalink
Update src/core/Vector3.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilt committed Oct 13, 2012
1 parent 385b472 commit 739cd6e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/Vector3.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,7 @@ THREE.Vector3.prototype = {
},

angleTo: function ( v ) {
//angle between this and v:
//this 'dot' v = |this|*|v|*cos(alpha), where alpha is the angle
return Math.acos( (this.x*v.x+this.y*v.y+this.z*v.z) / (Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2)+Math.pow(this.z,2))) / (Math.sqrt(Math.pow(v.x,2)+Math.pow(v.y,2)+Math.pow(v.z,2))) );
return Math.acos( this.dot( v ) / this.length() / v.length() );
};

distanceTo: function ( v ) {
Expand Down

0 comments on commit 739cd6e

Please sign in to comment.