minor change
This commit is contained in:
parent
f0394ec7d1
commit
15f0c6b7b2
10
color.go
10
color.go
|
@ -65,6 +65,16 @@ func (c NRGBA) RGBA() (r, g, b, a uint32) {
|
|||
return
|
||||
}
|
||||
|
||||
func clamp(x, low, high float64) float64 {
|
||||
if x < low {
|
||||
return low
|
||||
}
|
||||
if x > high {
|
||||
return high
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
||||
// NRGBAModel converts colors to NRGBA format.
|
||||
var NRGBAModel = color.ModelFunc(nrgbaModel)
|
||||
|
||||
|
|
Loading…
Reference in New Issue