From 6fc6c7ed95caf643e40d165aaeb06d40e0caa9b1 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 18 Feb 2015 11:04:23 +0900 Subject: [PATCH] Add comments --- colorm.go | 2 ++ geom.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/colorm.go b/colorm.go index 193e17efa..522268207 100644 --- a/colorm.go +++ b/colorm.go @@ -77,6 +77,7 @@ func (c *ColorM) Add(other ColorM) { *c = result } +// Scale scales the matrix by (x, y). func (c *ColorM) Scale(r, g, b, a float64) { if !c.initialized { c.initialize() @@ -89,6 +90,7 @@ func (c *ColorM) Scale(r, g, b, a float64) { } } +// Translate translates the matrix by (x, y). func (c *ColorM) Translate(r, g, b, a float64) { if !c.initialized { c.initialize() diff --git a/geom.go b/geom.go index b042cd203..ac8828d1e 100644 --- a/geom.go +++ b/geom.go @@ -70,6 +70,7 @@ func (g *GeoM) Add(other GeoM) { *g = result } +// Scale scales the matrix by (x, y). func (g *GeoM) Scale(x, y float64) { if !g.initialized { g.initialize() @@ -80,6 +81,7 @@ func (g *GeoM) Scale(x, y float64) { } } +// Translate translates the matrix by (x, y). func (g *GeoM) Translate(tx, ty float64) { if !g.initialized { g.initialize() @@ -111,7 +113,7 @@ func ScaleGeo(x, y float64) GeoM { } } -// TranslateGeo returns a matrix taht translates a geometry matrix by (tx, ty). +// TranslateGeo returns a matrix that translates a geometry matrix by (tx, ty). func TranslateGeo(tx, ty float64) GeoM { return GeoM{ initialized: true,