Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rh12503 committed Apr 25, 2021
1 parent 21edacb commit 3825b13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions color/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ type RGB struct {
B float64
}

// NewNormRGB returns a new RGB.
func NewNormRGB(r, g, b float64) RGB {
// NewRGB returns a new RGB.
func NewRGB(r, g, b float64) RGB {
return RGB{r, g, b}
}

Expand All @@ -30,7 +30,7 @@ func (argb *AverageRGB) Add(rgb RGB) {
// Average returns the average of all added colors.
func (argb AverageRGB) Average() RGB {
c := float64(argb.count)
return NewNormRGB(argb.rgb.R/c, argb.rgb.G/c, argb.rgb.B/c)
return NewRGB(argb.rgb.R/c, argb.rgb.G/c, argb.rgb.B/c)
}

// Count returns the number of colors added to the average
Expand Down

0 comments on commit 3825b13

Please sign in to comment.