geom.go
func (g *GeoM) Invert() {
	det := g.det()
	if det == 0 {
		panic("ebiten: g is not invertible")
	}

	a := (g.d_1 + 1) / det
	b := -g.b / det
	c := -g.c / det
	d := (g.a_1 + 1) / det
	tx := (-(g.d_1+1)*g.tx + g.b*g.ty) / det
	ty := (g.c*g.tx + -(g.a_1+1)*g.ty) / det

	g.a_1 = a - 1
	g.b = b
	g.c = c
	g.d_1 = d - 1
	g.tx = tx
	g.ty = ty
}
func (g *GeoM) Invert() {
	det := g.det()
	if det == 0 {
		panic("ebiten: g is not invertible")
	}

	a := (g.d_1 + 1) / det
	b := -g.b / det
	c := -g.c / det
	d := (g.a_1 + 1) / det
	tx := (-(g.d_1+1)*g.tx + g.b*g.ty) / det
	ty := (g.c*g.tx + -(g.a_1+1)*g.ty) / det

	g.a_1 = a - 1
	g.b = b
	g.c = c
	g.d_1 = d - 1
	g.tx = tx
	g.ty = ty
}
func ( g * GeoM ) Invert ( ) { det := g . det ( ) if det == 0 { panic ( " " ) } a := ( g . d_1 + 1 ) / det b := - g . b / det c := - g . c / det d := ( g . a_1 + 1 ) / det tx := ( - ( g . d_1 + 1 ) * g . tx + g . b * g . ty ) / det ty := ( g . c * g . tx + - ( g . a_1 + 1 ) * g . ty ) / det g . a_1 = a - 1 g . b = b g . c = c g . d_1 = d - 1 g . tx = tx g . ty = ty }
// Invert inverts the matrix.
// If g is not invertible, Invert panics.
Invert inverts the matrix . If g is not invertible Invert panics .