code: func AdjustSigmoid(img image.Image, midpoint, factor float64) *image.NRGBA {
  	if factor == 0 {
  		return Clone(img)
  	}
  
  	lut := make([]uint8, 256)
  	a := math.Min(math.Max(midpoint, 0.0), 1.0)
  	b := math.Abs(factor)
  	sig0 := sigmoid(a, b, 0)
  	sig1 := sigmoid(a, b, 1)
  	e := 1.0e-6
  
  	if factor > 0 {
  		for i := 0; i < 256; i++ {
  			x := float64(i) / 255.0
  			sigX := sigmoid(a, b, x)
  			f := (sigX - sig0) / (sig1 - sig0)
  			lut[i] = clamp(f * 255.0)
  		}
  	} else {
  		for i := 0; i < 256; i++ {
  			x := float64(i) / 255.0
  			arg := math.Min(math.Max((sig1-sig0)*x+sig0, e), 1.0-e)
  			f := a - math.Log(1.0/arg-1.0)/b
  			lut[i] = clamp(f * 255.0)
  		}
  	}
  
  	return adjustLUT(img, lut)
  }
docs: // AdjustSigmoid changes the contrast of the image using a sigmoidal function and returns the adjusted image.
  // It's a non-linear contrast change useful for photo adjustments as it preserves highlight and shadow detail.
  // The midpoint parameter is the midpoint of contrast that must be between 0 and 1, typically 0.5.
  // The factor parameter indicates how much to increase or decrease the contrast, typically in range (-10, 10).
  // If the factor parameter is positive the image contrast is increased otherwise the contrast is decreased.
  //
  // Examples:
  //
  //	dstImage = imaging.AdjustSigmoid(srcImage, 0.5, 3.0) // Increase the contrast.
  //	dstImage = imaging.AdjustSigmoid(srcImage, 0.5, -3.0) // Decrease the contrast.
  //