Updated readability of the code.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / basic / texturedpolygon / PolygonBorderInterpolator.java
index 77a0ac7..c0ae36f 100644 (file)
@@ -1,12 +1,7 @@
 /*
- * Sixth 3D engine. Copyright ©2012-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
- *
+ * Sixth 3D engine. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
  */
-
 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.texturedpolygon;
 
 import eu.svjatoslav.sixth.e3d.geometry.Point2D;
@@ -61,11 +56,9 @@ public class PolygonBorderInterpolator implements
 
         if (p1.y < p2.y) {
             if (y >= p1.y)
-                if (y <= p2.y)
-                    return true;
+                return y <= p2.y;
         } else if (y >= p2.y)
-            if (y <= p1.y)
-                return true;
+            return y <= p1.y;
 
         return false;
     }