mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
Add comments
This commit is contained in:
parent
baaa8734b9
commit
67f837ff18
@ -58,6 +58,7 @@ func (c *ColorM) Element(i, j int) float64 {
|
||||
}
|
||||
|
||||
// Concat multiplies a color matrix with the other color matrix.
|
||||
// This is same as muptiplying the matrix other and the matrix c in this order.
|
||||
func (c *ColorM) Concat(other ColorM) {
|
||||
if !c.initialized {
|
||||
c.initialize()
|
||||
|
2
geom.go
2
geom.go
@ -51,6 +51,7 @@ func (g *GeoM) Element(i, j int) float64 {
|
||||
}
|
||||
|
||||
// Concat multiplies a geometry matrix with the other geometry matrix.
|
||||
// This is same as muptiplying the matrix other and the matrix g in this order.
|
||||
func (g *GeoM) Concat(other GeoM) {
|
||||
if !g.initialized {
|
||||
g.initialize()
|
||||
@ -90,6 +91,7 @@ func (g *GeoM) Translate(tx, ty float64) {
|
||||
g.es[1][2] += ty
|
||||
}
|
||||
|
||||
// Rotate rotates the matrix by theta.
|
||||
func (g *GeoM) Rotate(theta float64) {
|
||||
sin, cos := math.Sincos(theta)
|
||||
g.Concat(GeoM{
|
||||
|
Loading…
Reference in New Issue
Block a user