Skip to content

Commit

Permalink
Add cast for legacy max behavior returning boolean.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrogoyski committed Mar 2, 2024
1 parent ae967a3 commit 20fd816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Statistics/Distance.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public static function chebyshev(array $xs, array $ys): float
throw new Exception\BadDataException('xs and ys must have the same number of elements');
}

return \max(\array_map(
return (float) \max(\array_map(
function (float $xᵢ, $yᵢ) {
return \abs($xᵢ - $yᵢ);
},
Expand Down

0 comments on commit 20fd816

Please sign in to comment.