From 15f0c6b7b2360d5f6f56300be0919616ee98242d Mon Sep 17 00:00:00 2001 From: faiface Date: Mon, 6 Mar 2017 19:59:02 +0100 Subject: [PATCH] minor change --- color.go | 10 ++++++++++ util.go | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 util.go diff --git a/color.go b/color.go index 86c9ca1..0303704 100644 --- a/color.go +++ b/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) diff --git a/util.go b/util.go deleted file mode 100644 index 24e6199..0000000 --- a/util.go +++ /dev/null @@ -1,11 +0,0 @@ -package pixel - -func clamp(x, low, high float64) float64 { - if x < low { - return low - } - if x > high { - return high - } - return x -}