Преглед изворни кода

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

Mr.doob пре 13 година
родитељ
комит
a88d4d2c79
1 измењених фајлова са 4 додато и 0 уклоњено
  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 ) {
 
 		return Math.sqrt( this.distanceToSquared( v ) );