Skip to content

Instantly share code, notes, and snippets.

@lackac
Forked from ypetya/gist:169100
Created August 17, 2009 15:03
Show Gist options
  • Save lackac/169161 to your computer and use it in GitHub Desktop.
Save lackac/169161 to your computer and use it in GitHub Desktop.
def how_to_make_pizza( components, pizza_size )
components.each do |component|
angle = rand * 2 * Math::PI
dist = rand(pizza_size) / 2.0
Fan << component.move_to( Position.new( dist * Math.cos( angle ), dist * Math.sin ( angle )).release
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment