Browse Source

Merge pull request #12507 from WestLangley/dev-cross

Vector3: fix .cross() method
Mr.doob 7 years ago
parent
commit
3466e20847
1 changed files with 1 additions and 7 deletions
  1. 1 7
      src/math/Vector3.js

+ 1 - 7
src/math/Vector3.js

@@ -539,13 +539,7 @@ Object.assign( Vector3.prototype, {
 
 
 		}
 		}
 
 
-		var x = this.x, y = this.y, z = this.z;
-
-		this.x = y * v.z - z * v.y;
-		this.y = z * v.x - x * v.z;
-		this.z = x * v.y - y * v.x;
-
-		return this;
+		return this.crossVectors( this, v );
 
 
 	},
 	},