From 3e4b1b8ebdd3ad0ce05a1ca03113819ec9044d36 Mon Sep 17 00:00:00 2001 From: faiface Date: Sun, 28 May 2017 00:06:29 +0200 Subject: [PATCH] minorly simplify typewriter example --- typewriter/main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/typewriter/main.go b/typewriter/main.go index d7691ff..24ee972 100644 --- a/typewriter/main.go +++ b/typewriter/main.go @@ -227,10 +227,7 @@ func (dl *dotlight) Draw(t pixel.Target, m pixel.Matrix) { dl.imd.Color = pixel.Alpha(0) for i := 0.0; i <= 32; i++ { angle := i * 2 * math.Pi / 32 - dl.imd.Push(dl.pos.Add(pixel.V( - math.Cos(angle)*dl.radius, - math.Sin(angle)*dl.radius, - ))) + dl.imd.Push(dl.pos.Add(pixel.V(dl.radius, 0).Rotated(angle))) } dl.imd.Polygon(0) dl.imd.Draw(t)