Formula for trajectory of object reflecting on walls relative to stationary object

The object is going at inf. speed with no gravity or velocity, so the regular trajectory formula is unusable, there are no circular angles, only triangular. The angles are determined by a xtrajectory and ytrajectory and they either go negative or positive depending on the direction (right/left), going at infinite speed in that direction. So I need to determine if that object will end up hitting the stationary object the next time it reflects it’s angle off of a wall/ceiling. For reference: straight right/left = xtrajectory = 65536 going right, negative if left. Straight up/down = ytrajectory = 65536 going down, negative if up.

Here’s an example picture of an angle (left, down), xtrajectory = -32768, ytrajectory = 56756: http://puu.sh/rCcDa/8412e14200.jpg