Add comments

This commit is contained in:
Hajime Hoshi 2015-02-18 11:04:23 +09:00
parent 95316a1de5
commit 6fc6c7ed95
2 changed files with 5 additions and 1 deletions

View File

@ -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()

View File

@ -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,