package pixel func clamp(x, low, high float64) float64 { if x < low { return low } if x > high { return high } return x }