소스 검색

Merge pull request #12507 from WestLangley/dev-cross

Vector3: fix .cross() method
Mr.doob 8 년 전
부모
커밋
3466e20847
1개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  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 );
 
 	},