From: Jérôme Benoit Date: Mon, 5 Mar 2018 13:16:33 +0000 (+0100) Subject: TP2: cast double to int the compare method returned value. X-Git-Url: https://git.piment-noir.org/?p=TP_POO.git;a=commitdiff_plain;h=a8276a31e5cfa00657738bb5803438fa82752d15 TP2: cast double to int the compare method returned value. Signed-off-by: Jérôme Benoit --- diff --git a/TP2/Image.java b/TP2/Image.java index 007dd57..65d0929 100644 --- a/TP2/Image.java +++ b/TP2/Image.java @@ -92,7 +92,7 @@ public class Image extends Forme implements Compactable, } public int compare(Image image1, Image image2) { - return image1.getpOri().getY() - image2.getpOri().getY(); + return (int)(image1.getpOri().getY() - image2.getpOri().getY()); } }