From be247e49f510dbef6e24203b54ee0de9684f2c0b Mon Sep 17 00:00:00 2001 From: faiface Date: Mon, 3 Jul 2017 00:23:07 +0200 Subject: [PATCH] optimize ToRGBA (weird one) --- color.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/color.go b/color.go index 918cd5a..4b41af3 100644 --- a/color.go +++ b/color.go @@ -80,14 +80,6 @@ func ToRGBA(c color.Color) RGBA { if c, ok := c.(RGBA); ok { return c } - if c, ok := c.(color.RGBA); ok { - return RGBA{ - R: float64(c.R) / 255, - G: float64(c.G) / 255, - B: float64(c.B) / 255, - A: float64(c.A) / 255, - } - } r, g, b, a := c.RGBA() return RGBA{ float64(r) / 0xffff,