First the pic:

OK so you can work out what happens if a ball hits either of the first two walls. Now what if the ball its a CORNER where two walls join?
If my code is moving the ball a certain amount each frame, it is possible that the ball whill move fast enough in a single frame to overlay the point in such a way that it collides with BOTH lines that make up the corner, yes?
So the final angle of the ball merely depends on which line I test first for collision with the ball (assuming I don't test any other lines after the first collision is detected). And if I test BOTH lines for collision and change the final angle of the ball twice, it will have both x,y directions reversed, thus will come back in the same direction!
Neither seems realistic because in "real life" where there is no "framerate" it would ALWAYS hit one sooner than the other because it would never "overlap" the point (ignoring elasticity etc).
So there may be a way to send a vector in the direction of the ball movement and test which one of the lines it hits first, before the ball actually hits. Then move the ball to the exact point of contact and calc the correct exit angle.
What do you think? Is it too perfectionist and should I just pick the first one I detect in an overlap condition?

OK so you can work out what happens if a ball hits either of the first two walls. Now what if the ball its a CORNER where two walls join?
If my code is moving the ball a certain amount each frame, it is possible that the ball whill move fast enough in a single frame to overlay the point in such a way that it collides with BOTH lines that make up the corner, yes?
So the final angle of the ball merely depends on which line I test first for collision with the ball (assuming I don't test any other lines after the first collision is detected). And if I test BOTH lines for collision and change the final angle of the ball twice, it will have both x,y directions reversed, thus will come back in the same direction!
Neither seems realistic because in "real life" where there is no "framerate" it would ALWAYS hit one sooner than the other because it would never "overlap" the point (ignoring elasticity etc).
So there may be a way to send a vector in the direction of the ball movement and test which one of the lines it hits first, before the ball actually hits. Then move the ball to the exact point of contact and calc the correct exit angle.
What do you think? Is it too perfectionist and should I just pick the first one I detect in an overlap condition?