put the note in float

This commit is contained in:
mckmonster 2024-10-01 16:32:40 +02:00
parent c3abe78460
commit 348af6b56d

View file

@ -8,7 +8,7 @@ class Note {
private $coef; private $coef;
private $max; 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->intitule = $intitule;
$this->note = $note; $this->note = $note;
$this->coef = $coef; $this->coef = $coef;
@ -24,7 +24,7 @@ class Note {
} }
public function getNoteOn20() { public function getNoteOn20() {
return ($this->note / $this->max) * 20; return ($this->note / $this->max) * 20.0;
} }
public function getCoef() { public function getCoef() {