Remove returning values of Add/Concat

This commit is contained in:
Hajime Hoshi 2014-12-29 19:04:18 +09:00
parent 2d667a399c
commit b77181e37a
2 changed files with 4 additions and 12 deletions

View File

@ -60,27 +60,23 @@ func (c ColorM) Element(i, j int) float64 {
}
// Concat multiplies a color matrix with the other color matrix.
// This returns c.
func (c *ColorM) Concat(other ColorM) ColorM {
func (c *ColorM) Concat(other ColorM) {
if !c.initialized {
*c = colorMI
}
result := ColorM{}
mul(&other, c, &result)
*c = result
return *c
}
// Add adds a color matrix with the other color matrix.
// This returns c.
func (c *ColorM) Add(other ColorM) ColorM {
func (c *ColorM) Add(other ColorM) {
if !c.initialized {
*c = colorMI
}
result := ColorM{}
add(&other, c, &result)
*c = result
return *c
}
// SetElement sets an element at (i, j).

View File

@ -53,27 +53,23 @@ func (g GeoM) Element(i, j int) float64 {
}
// Concat multiplies a geometry matrix with the other geometry matrix.
// This returns g.
func (g *GeoM) Concat(other GeoM) GeoM {
func (g *GeoM) Concat(other GeoM) {
if !g.initialized {
*g = geoMI
}
result := GeoM{}
mul(&other, g, &result)
*g = result
return *g
}
// Add adds a geometry matrix with the other geometry matrix.
// This returns g.
func (g *GeoM) Add(other GeoM) GeoM {
func (g *GeoM) Add(other GeoM) {
if !g.initialized {
*g = geoMI
}
result := GeoM{}
add(&other, g, &result)
*g = result
return *g
}
// SetElement sets an element at (i, j).