Browse Source

Fix coding style

Henri Astre 11 years ago
parent
commit
99b7e5311a
2 changed files with 4 additions and 12 deletions
  1. 2 10
      src/math/Quaternion.js
  2. 2 2
      test/unit/math/Quaternion.js

+ 2 - 10
src/math/Quaternion.js

@@ -399,17 +399,9 @@ THREE.Quaternion.prototype = {
 
 	slerp: function ( qb, t ) {
 
-		if (t === 0) {
+		if (t === 0) return this;
 
-			return this;
-
-		}
-
-		else if (t === 1) {
-
-			return this.copy( qb );
-
-		}
+		if (t === 1) return this.copy( qb );
 
 		var x = this._x, y = this._y, z = this._z, w = this._w;
 

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

@@ -214,6 +214,6 @@ test( "slerp", function() {
 	var a = new THREE.Quaternion( 0.675341, 0.408783, 0.328567, 0.518512 );
 	var b = new THREE.Quaternion( 0.660279, 0.436474, 0.35119, 0.500187 );
 
-	ok( a.slerp(b, 0).equals(a), "Passed!" );
-	ok( a.slerp(b, 1).equals(b), "Passed!" );
+	ok( a.slerp( b, 0 ).equals( a ), "Passed!" );
+	ok( a.slerp( b, 1 ).equals( b ), "Passed!" );
 });