Skip to main content
2 events
when toggle format what by license comment
Jan 17, 2012 at 12:22 comment added Paul Martel To me, 'bounceVertical' sounds like a function that switches the vertical component and leaves the horizontal alone. So an angle of 60 becomes 360 - 60 = 300 (a.k.a. -60), even though this is what happens when bouncing off a horizontal surface. So I'd have switched the 2 names/formulas or called them bounceAgainstHorizontal et. al. Also, (540 - direction) % 360 would keep angles < 180 in range.
Jan 17, 2012 at 10:12 history answered Dawood ibn Kareem CC BY-SA 3.0