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
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.
|
// 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) {
|
func (c *ColorM) Concat(other ColorM) {
|
||||||
if !c.initialized {
|
if !c.initialized {
|
||||||
c.initialize()
|
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.
|
// 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) {
|
func (g *GeoM) Concat(other GeoM) {
|
||||||
if !g.initialized {
|
if !g.initialized {
|
||||||
g.initialize()
|
g.initialize()
|
||||||
@ -90,6 +91,7 @@ func (g *GeoM) Translate(tx, ty float64) {
|
|||||||
g.es[1][2] += ty
|
g.es[1][2] += ty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rotate rotates the matrix by theta.
|
||||||
func (g *GeoM) Rotate(theta float64) {
|
func (g *GeoM) Rotate(theta float64) {
|
||||||
sin, cos := math.Sincos(theta)
|
sin, cos := math.Sincos(theta)
|
||||||
g.Concat(GeoM{
|
g.Concat(GeoM{
|
||||||
|
Loading…
Reference in New Issue
Block a user