Browse Source

Merge remote-tracking branch 'Wilt/patch-2' into dev

Mr.doob 13 years ago
parent
commit
a88d4d2c79
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/core/Vector3.js

+ 4 - 0
src/core/Vector3.js

@@ -249,6 +249,10 @@ THREE.Vector3.prototype = {
 
 
 	},
 	},
 
 
+	angleTo: function ( v ) {
+		return Math.acos( this.dot( v ) / this.length() / v.length() );
+	};
+
 	distanceTo: function ( v ) {
 	distanceTo: function ( v ) {
 
 
 		return Math.sqrt( this.distanceToSquared( v ) );
 		return Math.sqrt( this.distanceToSquared( v ) );