Skip to content

Commit

Permalink
https://github.com/mage2pro/core/issues/379
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jun 5, 2024
1 parent dc86301 commit b69d704
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ final class Diff {
* @param int[] $rgb2
*/
static function p(array $rgb1, array $rgb2):float {
list($l1, $a1, $b1) = self::_rgb2lab($rgb1);
list($l2, $a2, $b2) = self::_rgb2lab($rgb2);
# 2024-06-06 "Use the «Symmetric array destructuring» PHP 7.1 feature": https://github.com/mage2pro/core/issues/379
[$l1, $a1, $b1] = self::_rgb2lab($rgb1);
[$l2, $a2, $b2] = self::_rgb2lab($rgb2);
$avg_lp = ($l1 + $l2) / 2;
$c1 = sqrt(pow($a1, 2) + pow($b1, 2));
$c2 = sqrt(pow($a2, 2) + pow($b2, 2));
Expand Down

0 comments on commit b69d704

Please sign in to comment.