1
0
Эх сурвалжийг харах

Fix/Adjust interpretation of shift value

Fixes the conversion from the degree to a float value and makes it consistent with most other color pickers.
StruffelProductions 5 жил өмнө
parent
commit
7b1841f29f
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      adjust.go

+ 1 - 1
adjust.go

@@ -95,7 +95,7 @@ func AdjustHue(img image.Image, shift float64) *image.NRGBA {
 	}
 
 	shift = math.Min(math.Max(shift, -180), 180)
-	shift = shift / 180
+	shift = shift / -360
 
 	return AdjustFunc(img, func(c color.NRGBA) color.NRGBA {
 		h, s, l := rgbToHSL(c.R, c.G, c.B)