TP2: cast double to int the compare method returned value.
[TP_POO.git] / TP2 / Image.java
index 61dd27014c7c9888cf9418a65a1648fad963623b..65d0929e69f9cadae3daa7096ad43b3f9d5d2edf 100644 (file)
@@ -92,7 +92,7 @@ public class Image extends Forme implements Compactable,
     }
 
     public int compare(Image image1, Image image2) {
-        return image1.getSize() - image2.getSize();
+        return (int)(image1.getpOri().getY() - image2.getpOri().getY());
     }
 
 }