From a8276a31e5cfa00657738bb5803438fa82752d15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 5 Mar 2018 14:16:33 +0100 Subject: [PATCH] TP2: cast double to int the compare method returned value. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- TP2/Image.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } } -- 2.34.1