Skip to content

Instantly share code, notes, and snippets.

@ypetya
Forked from anonymous/gist:169097
Created August 17, 2009 12:27
Show Gist options
  • Save ypetya/169100 to your computer and use it in GitHub Desktop.
Save ypetya/169100 to your computer and use it in GitHub Desktop.
How not to make a very own pizza if you work at a pizza restaurant
# FIXME: You shouldn't do thatway!
def how_to_make_pizza( components, pizza_size )
components.each do |component|
angle = rand( 2 * Math::PI * 1000 ).to_f / 1000
dist = rand(pizza_size.to_i)
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