mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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.
|
||||
// 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).
|
||||
|
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.
|
||||
// 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).
|
||||
|
Loading…
Reference in New Issue
Block a user