From 0b135865194ef7628aefd2f48a76ae42d0c70b3a Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Thu, 12 Aug 2021 21:11:32 +1000 Subject: [PATCH] comment tweaks --- engine/camera.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/camera.go b/engine/camera.go index 94a97f1..43efcf4 100644 --- a/engine/camera.go +++ b/engine/camera.go @@ -31,7 +31,7 @@ func (c *Camera) Draw(screen *ebiten.Image, opts ebiten.DrawImageOptions) { zoom = c.zoomBound } - // If the configured centre still puts the camera out of bounds, move it. + // If the configured centre puts the camera out of bounds, move it. centre := c.Centre // Camera frame currently Rectangle{ centre ± (screen/(2*zoom)) }. sw2, sh2 := float64(c.game.ScreenWidth/2), float64(c.game.ScreenHeight/2) @@ -50,7 +50,7 @@ func (c *Camera) Draw(screen *ebiten.Image, opts ebiten.DrawImageOptions) { } // Apply camera controls to geom. - // 1. Move c.Centre to the origin + // 1. Move centre to the origin opts.GeoM.Translate(-float64(centre.X), -float64(centre.Y)) // 2. Zoom and rotate opts.GeoM.Scale(zoom, zoom)