From 348af6b56d6e8d1788eadd7569f947f3a8e82877 Mon Sep 17 00:00:00 2001 From: mckmonster Date: Tue, 1 Oct 2024 16:32:40 +0200 Subject: [PATCH] put the note in float --- libs/bulletin/Note.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/bulletin/Note.lib.php b/libs/bulletin/Note.lib.php index ac0a4c0..4fca14a 100644 --- a/libs/bulletin/Note.lib.php +++ b/libs/bulletin/Note.lib.php @@ -8,7 +8,7 @@ class Note { private $coef; private $max; - public function __construct(string $intitule, int $note, int $max, float $coef = 1.0) { + public function __construct(string $intitule, float $note, float $max, float $coef = 1.0) { $this->intitule = $intitule; $this->note = $note; $this->coef = $coef; @@ -24,7 +24,7 @@ class Note { } public function getNoteOn20() { - return ($this->note / $this->max) * 20; + return ($this->note / $this->max) * 20.0; } public function getCoef() {