Skip to content

Commit

Permalink
Make distance calculation functions static
Browse files Browse the repository at this point in the history
  • Loading branch information
kodie committed Aug 30, 2021
1 parent 98a46e6 commit f97aac6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Distance.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Distance
{
public function CIE76($color1, $color2): float
public static function CIE76($color1, $color2): float
{
if (gettype($color1) === 'string') {
$color1 = Factory::fromString($color1);
Expand All @@ -29,7 +29,7 @@ public function CIE76($color1, $color2): float
return max(min(sqrt($sum), 100), 0);
}

public function CIE94($color1, $color2, $textiles = 0): float
public static function CIE94($color1, $color2, $textiles = 0): float
{
if (gettype($color1) === 'string') {
$color1 = Factory::fromString($color1);
Expand Down Expand Up @@ -79,7 +79,7 @@ public function CIE94($color1, $color2, $textiles = 0): float
return $i < 0 ? 0 : sqrt($i);
}

public function CIEDE2000($color1, $color2): float
public static function CIEDE2000($color1, $color2): float
{
if (gettype($color1) === 'string') {
$color1 = Factory::fromString($color1);
Expand Down

0 comments on commit f97aac6

Please sign in to comment.