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';