File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
processing_app/library/vecmath/vec2d/library/verlet_chain/lib Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,12 @@ def render
3939
4040 def bounds_collision
4141 if x_bound . exclude? pos . x
42- pos . x = constrain pos . x , x_bound . lower , x_bound . upper
43- pos_old . x = pos . x
44- pos . x = ( pos . x <= radius ) ? pos . x + push . x : pos . x - push . x
42+ pos_old . x = constrain pos . x , x_bound . lower , x_bound . upper
43+ pos . x = ( pos . x <= radius ) ? pos_old . x + push . x : pos_old . x - push . x
4544 end
4645 return unless y_bound . exclude? pos . y
47- pos . y = constrain pos . y , y_bound . lower , y_bound . upper
48- pos_old . y = pos . y
49- pos . y = ( pos . y <= radius ) ? pos . y + push . y : pos . y - push . y
46+ pos_old . y = constrain pos . y , y_bound . lower , y_bound . upper
47+ pos . y = ( pos . y <= radius ) ? pos_old . y + push . y : pos_old . y - push . y
5048 end
5149end
5250
You can’t perform that action at this time.
0 commit comments