mirror of
https://github.com/nxshock/colorcrop.git
synced 2025-07-02 00:23:44 +05:00
Fix linter errors
This commit is contained in:
parent
b37c01d93b
commit
ab1c13e694
2 changed files with 5 additions and 4 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
// range 0.0..1.0.
|
||||
type comparator func(color.Color, color.Color) float64
|
||||
|
||||
// CmpColorDifference returns difference of two colors
|
||||
// CmpSquareRGBComponentsDiff returns difference of two colors
|
||||
func CmpSquareRGBComponentsDiff(color1 color.Color, color2 color.Color) float64 {
|
||||
const maxDiff = 113509.94967402637 // Difference between black and white colors
|
||||
|
||||
|
@ -20,7 +20,7 @@ func CmpSquareRGBComponentsDiff(color1 color.Color, color2 color.Color) float64
|
|||
math.Pow(float64(b2)-float64(b1), 2.0)) / maxDiff
|
||||
}
|
||||
|
||||
// CmpColorDifference returns difference of two colors.
|
||||
// CmpRGBComponentsDiff returns difference of two colors.
|
||||
func CmpRGBComponentsDiff(color1 color.Color, color2 color.Color) float64 {
|
||||
const maxDiff = 765 // Difference between black and white colors
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue