Browse Source

Improve Quaternion closure performance

Tristan VALCKE 8 years ago
parent
commit
563060ae23
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/math/Quaternion.js

+ 2 - 1
src/math/Quaternion.js

@@ -332,7 +332,8 @@ Object.assign( Quaternion.prototype, {
 
 
 		// assumes direction vectors vFrom and vTo are normalized
 		// assumes direction vectors vFrom and vTo are normalized
 
 
-		var v1, r;
+		var v1 = new Vector3();
+		var r;
 
 
 		var EPS = 0.000001;
 		var EPS = 0.000001;