From 8b267265ed09ee4dd076db6ef43736706af02e0b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 20 Mar 2023 11:04:55 +0900 Subject: [PATCH] ebiten: update comments Updates #2171 --- colorscale.go | 2 +- image.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/colorscale.go b/colorscale.go index 563e65136..936a2cda0 100644 --- a/colorscale.go +++ b/colorscale.go @@ -90,7 +90,7 @@ func (c *ColorScale) SetA(a float32) { // // Scale is slightly different from colorm.ColorM's Scale in terms of alphas. // ColorScale is applied to premultiplied-alpha colors, while colorm.ColorM is applied to straight-alpha colors. -// Thus, colorm.ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a). +// Thus, ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a). func (c *ColorScale) Scale(r, g, b, a float32) { c.r_1 = (c.r_1+1)*r - 1 c.g_1 = (c.g_1+1)*g - 1 diff --git a/image.go b/image.go index 8935987c1..4543ba6af 100644 --- a/image.go +++ b/image.go @@ -114,7 +114,7 @@ type DrawImageOptions struct { // // ColorScale is slightly different from colorm.ColorM's Scale in terms of alphas. // ColorScale is applied to premultiplied-alpha colors, while colorm.ColorM is applied to straight-alpha colors. - // Thus, colorm.ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a). + // Thus, ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a). // // The default (zero) value is identity, which is (1, 1, 1, 1). ColorScale ColorScale