mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Remove returning values of Add/Concat
This commit is contained in:
parent
2d667a399c
commit
b77181e37a
@ -60,27 +60,23 @@ func (c ColorM) Element(i, j int) float64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Concat multiplies a color matrix with the other color matrix.
|
// Concat multiplies a color matrix with the other color matrix.
|
||||||
// This returns c.
|
func (c *ColorM) Concat(other ColorM) {
|
||||||
func (c *ColorM) Concat(other ColorM) ColorM {
|
|
||||||
if !c.initialized {
|
if !c.initialized {
|
||||||
*c = colorMI
|
*c = colorMI
|
||||||
}
|
}
|
||||||
result := ColorM{}
|
result := ColorM{}
|
||||||
mul(&other, c, &result)
|
mul(&other, c, &result)
|
||||||
*c = result
|
*c = result
|
||||||
return *c
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add adds a color matrix with the other color matrix.
|
// Add adds a color matrix with the other color matrix.
|
||||||
// This returns c.
|
func (c *ColorM) Add(other ColorM) {
|
||||||
func (c *ColorM) Add(other ColorM) ColorM {
|
|
||||||
if !c.initialized {
|
if !c.initialized {
|
||||||
*c = colorMI
|
*c = colorMI
|
||||||
}
|
}
|
||||||
result := ColorM{}
|
result := ColorM{}
|
||||||
add(&other, c, &result)
|
add(&other, c, &result)
|
||||||
*c = result
|
*c = result
|
||||||
return *c
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetElement sets an element at (i, j).
|
// SetElement sets an element at (i, j).
|
||||||
|
8
geom.go
8
geom.go
@ -53,27 +53,23 @@ func (g GeoM) Element(i, j int) float64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Concat multiplies a geometry matrix with the other geometry matrix.
|
// Concat multiplies a geometry matrix with the other geometry matrix.
|
||||||
// This returns g.
|
func (g *GeoM) Concat(other GeoM) {
|
||||||
func (g *GeoM) Concat(other GeoM) GeoM {
|
|
||||||
if !g.initialized {
|
if !g.initialized {
|
||||||
*g = geoMI
|
*g = geoMI
|
||||||
}
|
}
|
||||||
result := GeoM{}
|
result := GeoM{}
|
||||||
mul(&other, g, &result)
|
mul(&other, g, &result)
|
||||||
*g = result
|
*g = result
|
||||||
return *g
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add adds a geometry matrix with the other geometry matrix.
|
// Add adds a geometry matrix with the other geometry matrix.
|
||||||
// This returns g.
|
func (g *GeoM) Add(other GeoM) {
|
||||||
func (g *GeoM) Add(other GeoM) GeoM {
|
|
||||||
if !g.initialized {
|
if !g.initialized {
|
||||||
*g = geoMI
|
*g = geoMI
|
||||||
}
|
}
|
||||||
result := GeoM{}
|
result := GeoM{}
|
||||||
add(&other, g, &result)
|
add(&other, g, &result)
|
||||||
*g = result
|
*g = result
|
||||||
return *g
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetElement sets an element at (i, j).
|
// SetElement sets an element at (i, j).
|
||||||
|
Loading…
Reference in New Issue
Block a user