Explorar el Código

rename Plane.flip() -> Plane.negate() per @mrdoob

Ben Houston hace 12 años
padre
commit
800d0f8e87
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      src/math/Plane.js
  2. 2 2
      test/unit/math/Plane.js

+ 1 - 1
src/math/Plane.js

@@ -74,7 +74,7 @@ THREE.Plane.prototype = {
 
 	},
 
-	flip: function () {
+	negate: function () {
 
 		this.constant *= -1;
 		this.normal.negate();

+ 2 - 2
test/unit/math/Plane.js

@@ -94,14 +94,14 @@ test( "normalize", function() {
 	ok( a.constant == 1, "Passed!" );
 });
 
-test( "flip/distanceToPoint", function() {
+test( "negate/distanceToPoint", function() {
 	var a = new THREE.Plane( new THREE.Vector3( 2, 0, 0 ), -2 );
 	
 	a.normalize();
 	ok( a.distanceToPoint( new THREE.Vector3( 4, 0, 0 ) ) === 3, "Passed!" );
 	ok( a.distanceToPoint( new THREE.Vector3( 1, 0, 0 ) ) === 0, "Passed!" );
 
-	a.flip();
+	a.negate();
 	ok( a.distanceToPoint( new THREE.Vector3( 4, 0, 0 ) ) === -3, "Passed!" );
 	ok( a.distanceToPoint( new THREE.Vector3( 1, 0, 0 ) ) === 0, "Passed!" );
 });