OSDN Git Service

add strict unit test for math class.
[mikutoga/TogaGem.git] / src / main / java / jp / sfjp / mikutoga / math / MkPos3D.java
index c6abb82..9c80c3c 100644 (file)
@@ -120,10 +120,9 @@ public strictfp class MkPos3D {
      * @return 原点ならtrue
      */
     public boolean isOriginPoint(){
-        if(this.xPos != 0.0) return false;
-        if(this.yPos != 0.0) return false;
-        if(this.zPos != 0.0) return false;
-        return true;
+        boolean result =
+                this.xPos == 0.0 && this.yPos == 0.0 && this.zPos == 0.0;
+        return result;
     }
 
     /**