Skip to content

Commit

Permalink
clamp
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Feb 17, 2024
1 parent 09748c3 commit 42c2ffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 42c2ffe

Please sign in to comment.