From fdf780701141a8c9bf00ff040de8c0bd522a2f16 Mon Sep 17 00:00:00 2001 From: Anthony RICHARD Date: Sat, 20 May 2023 17:48:27 +0100 Subject: [PATCH] =?UTF-8?q?Modification=20de=20la=20fonction=20GetAvgRate?= =?UTF-8?q?=20pour=20que=20la=20moyenne=20soit=20arrondie=20=C3=A0=200.5f?= =?UTF-8?q?=20pr=C3=A8s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Stim.Model/Game.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Stim.Model/Game.cs b/Sources/Stim.Model/Game.cs index 4e2f6f3..588d1ff 100644 --- a/Sources/Stim.Model/Game.cs +++ b/Sources/Stim.Model/Game.cs @@ -88,7 +88,7 @@ namespace Model { sum += review.Rate; } - return sum / Reviews.Count; + return (float)(Math.Round((sum / Reviews.Count) * 2, MidpointRounding.AwayFromZero) / 2); } public void AddReview(Review review)