Skip to content

Commit 20fd816

Browse files
committed
Add cast for legacy max behavior returning boolean.
1 parent ae967a3 commit 20fd816

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Statistics/Distance.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public static function chebyshev(array $xs, array $ys): float
493493
throw new Exception\BadDataException('xs and ys must have the same number of elements');
494494
}
495495

496-
return \max(\array_map(
496+
return (float) \max(\array_map(
497497
function (float $xᵢ, $yᵢ) {
498498
return \abs($xᵢ - $yᵢ);
499499
},

0 commit comments

Comments
 (0)