Browse Source

optimize Vector3.reflect, unit tests still pass.

Ben Houston 12 years ago
parent
commit
f864ba1fd3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/math/Vector3.js

+ 2 - 2
src/math/Vector3.js

@@ -548,9 +548,9 @@ THREE.extend( THREE.Vector3.prototype, {
 
 		return function ( normal ) {
 
-		    v1.copy( this ).ortho( normal ).multiplyScalar( -2 );
+		    v1.copy( this ).project( normal ).multiplyScalar( 2 );
 
-		    return this.add( v1 );
+		    return this.subVectors( v1, this );
 
 		}