From 81677b30d1e05fe7c41a9e1c0368024dba092a91 Mon Sep 17 00:00:00 2001 From: emile Date: Mon, 8 Oct 2018 16:49:25 +0200 Subject: Commented what loops do --- draw/draw.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/draw/draw.go b/draw/draw.go index db75892..16b6ec3 100644 --- a/draw/draw.go +++ b/draw/draw.go @@ -35,7 +35,7 @@ func saveImage(dc *gg.Context, path string) { // drawStar draws the given stars to the given context func drawStar(dc *gg.Context, star structs.Star) { - dc.DrawPoint(star.C.X, star.C.Y, 1) + dc.DrawPoint(star.C.X, star.C.Y, 2) dc.Fill() dc.Stroke() } @@ -78,10 +78,12 @@ func drawForce(dc *gg.Context, star structs.Star) { func drawStars(dc *gg.Context, slice []structs.Star) { dc.SetRGB(1, 1, 1) + // draw all the forces in the given slice for _, star := range slice { drawForce(dc, star) } + // draw all the stars in the given slice for _, star := range slice { drawStar(dc, star) } -- cgit 1.4.1