examples/chipmunk_and_rmagick.rb
def polygon_vertices(sides, size)
    vertices = []
    sides.times do |i|
      angle = -2 * Math::PI * i / sides
      vertices << radians_to_vec2(angle) * size
    end
    return vertices
  end
# Produces the vertices of a regular polygon.
Produces the vertices of a regular polygon.
Produces the vertices of a regular polygon .
def polygon_vertices(sides, size)
    vertices = []
    sides.times do |i|
      angle = -2 * Math::PI * i / sides
      vertices << radians_to_vec2(angle) * size
    end
    return vertices
  end
def polygon_vertices ( sides , size ) vertices = [ ] sides . times do | i | angle = - 2 * Math :: PI * i / sides vertices << radians_to_vec2 ( angle ) * size end return vertices end
Produces the vertices of a regular polygon.
Produces the vertices of a regular polygon .
sides
size