tags:

views:

75

answers:

1

I know it's not programming question but I thought we could all use the challenge :)

Link to diagram

Point A is the source of a laser. It is shinned at a single mirror and then reflected to another mirror finally arriving at point B ... see picture.

The goal is to find the total distance of all the lines.

I am not a student and this is not homework.

+3  A: 

Same as a straight line from (-x, y) to (a, -b).

sqrt((a+x)^2 + (b+y)^2)

UncleO