We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b988f4 commit 7c24ed7Copy full SHA for 7c24ed7
packages/support/src/Math/functions.php
@@ -380,7 +380,7 @@ function max(array $numbers): null|int|float
380
*/
381
function maxva(int|float $first, int|float $second, int|float ...$rest): int|float
382
{
383
- $max = $first > $second ? $first : $second;
+ $max = \max($first, $second);
384
385
foreach ($rest as $number) {
386
if ($number > $max) {
@@ -512,7 +512,7 @@ function min(array $numbers): null|float|int
512
513
function minva(int|float $first, int|float $second, int|float ...$rest): int|float
514
515
- $min = $first < $second ? $first : $second;
+ $min = \min($first, $second);
516
517
518
if ($number < $min) {
0 commit comments