examples/airship: Bug fix: z could be a too small number

Fixes #1256
This commit is contained in:
Hajime Hoshi 2020-07-21 00:34:01 +09:00
parent 911750c4a6
commit a159f55520

View File

@ -206,7 +206,7 @@ func (g *Game) drawGroundImage(screen *ebiten.Image, ground *ebiten.Image) {
// z is in [2, -1]
rate := float64(j) / float64(ph)
z := (1-rate)*2 + rate*-1
if z <= 0 {
if z <= 1e-3 {
break
}
op := &ebiten.DrawImageOptions{}