mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Add comments
This commit is contained in:
parent
95316a1de5
commit
6fc6c7ed95
@ -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()
|
||||
|
4
geom.go
4
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,
|
||||
|
Loading…
Reference in New Issue
Block a user