From 06e864c95419ee884f871607239075f3a81f4855 Mon Sep 17 00:00:00 2001 From: Lee <42119604+Leesneaks@users.noreply.github.com> Date: Tue, 29 Dec 2020 17:36:16 +0000 Subject: [PATCH] added between() Added missing function from creature update. --- system/functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/functions.php b/system/functions.php index 2437094f..2a37536f 100644 --- a/system/functions.php +++ b/system/functions.php @@ -1408,6 +1408,16 @@ function getCreatureImgPath($creature){ } } +function between($x, $lim1, $lim2) { + if ($lim1 < $lim2) { + $lower = $lim1; $upper = $lim2; + } + else { + $lower = $lim2; $upper = $lim1; + } + return (($x >= $lower) && ($x <= $upper)); +} + // validator functions require_once LIBS . 'validator.php'; require_once SYSTEM . 'compat.php';