From a2ab3da89e96ad55a02fd95a7b1f1a9b24e6b30e Mon Sep 17 00:00:00 2001 From: Thomas de Roo <2+thomas@noreply.localhost> Date: Mon, 15 Jun 2026 12:06:16 +0200 Subject: [PATCH] Update includes/functions.php --- includes/functions.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index d7ee59f..3ed1a4a 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -68,3 +68,17 @@ function listPath( . slug($list) . '.json'; } + +function calculateNextInterval(array $word, bool $correct): int +{ + $correctCount = $word['correct'] ?? 0; + + if (!$correct) { + return 1; + } + + // gecontroleerde groei (SM-lite) + $interval = 1 + ($correctCount * 2); + + return min(30, $interval); +} \ No newline at end of file