From 42c2ffe24874a1de9fa3620cba0abb3ef5d9f1fa Mon Sep 17 00:00:00 2001 From: Simon Asika Date: Sat, 17 Feb 2024 21:07:39 +0800 Subject: [PATCH] clamp --- src/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions.php b/src/functions.php index f9ba3864..bc2bbe11 100644 --- a/src/functions.php +++ b/src/functions.php @@ -426,7 +426,7 @@ function value_compare(mixed $a, mixed $b, ?string $operator = null): int|bool } if (!function_exists('\Windwalker\clamp')) { - function clamp(int|float $num, int|float|null $min, int|float|null $max): int|bool + function clamp(int|float $num, int|float|null $min, int|float|null $max): int|float { if ($min !== null && $max !== null && $max < $min) { throw new \InvalidArgumentException(