ソースを参照

Simplified Plane constructor.

Mr.doob 12 年 前
コミット
8b97c343ba
1 ファイル変更2 行追加11 行削除
  1. 2 11
      src/math/Plane.js

+ 2 - 11
src/math/Plane.js

@@ -4,17 +4,8 @@
 
 THREE.Plane = function ( normal, constant ) {
 
-	if ( normal === undefined && constant === undefined ) {
-
-		this.normal = new THREE.Vector3();
-		this.constant = 0;
-
-	} else {
-
-		this.normal = normal.clone();
-		this.constant = constant || 0;
-
-	}
+	this.normal = normal !== undefined ? normal.clone() : new THREE.Vector3();
+	this.constant = constant !== undefined ? constant : 0;
 
 };