X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Frenderer%2Fraster%2Fshapes%2Fbasic%2Fsolidpolygon%2FLineInterpolator.java;h=11f01589a39653c8b90e7cecdcfe04f2f6ea0e1d;hp=45d5b96f6b62ec38f2cb16887a5cf79888e60b52;hb=59baa428fb2d9e7f0fe5423f4cea47f2d6245914;hpb=dcdff57f0bab42387b2e4e215778d9e8efc60221 diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/LineInterpolator.java b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/LineInterpolator.java index 45d5b96..11f0158 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/LineInterpolator.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/LineInterpolator.java @@ -1,5 +1,5 @@ /* - * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Sixth 3D engine. Copyright ©2012-2019, 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 @@ -33,12 +33,8 @@ public class LineInterpolator implements Comparable { if (absoluteHeight > o.absoluteHeight) return -1; - if (width < o.width) - return 1; - if (width > o.width) - return -1; + return Integer.compare(o.width, width); - return 0; } @Override