We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6db2af7 commit 5e21debCopy full SHA for 5e21deb
1 file changed
external_library/java/handy/library/balls/balls.rb
@@ -7,7 +7,8 @@ class Ball
7
def initialize(sketch, id)
8
@sketch = sketch
9
@position = Vec2D.new rand(100..300), rand(100..300)
10
- @delta = Vec2D.new rand(-6..6), rand(-6..6)
+ @delta = Vec2D.new rand(0.1..6), rand(0.1..6)
11
+ @delta *= -1 if rand > 0.5
12
@size = rand(60..100)
13
radius = @size / 2.0
14
@color = BALL_COLORS[id % BALL_COLORS.size]
0 commit comments