Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment, remove unused var #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions examples/glfw3/bouncing_balls/bouncing_balls.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
bouncing_balls is a simple non-interactive program showing use of the chipmunk package.

The code is based on pymunk's bouncing_balls.py example.

Needs glew and gflw2 headers to build.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gflw2 -> glfw3

*/
package main

import (
Expand All @@ -19,10 +26,9 @@ var (
space *chipmunk.Space
balls []*chipmunk.Shape
staticLines []*chipmunk.Shape
deg2rad = math.Pi / 180
)

// drawCircle draws a circle for the specified radius, rotation angle, and the specified number of sides
// drawCircle draws a circle for the specified radius and number of sides
func drawCircle(radius float64, sides int) {
gl.Begin(gl.LINE_LOOP)
for a := 0.0; a < 2*math.Pi; a += (2 * math.Pi / float64(sides)) {
Expand Down