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
39
39
40
40
def bounds_collision
41
41
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
45
44
end
46
45
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
50
48
end
51
49
end
52
50
You can’t perform that action at this time.
0 commit comments