Refract Facts

From programming_contest
Jump to navigation Jump to search

Solution 1: Binary search to find the exact angle Solution 2: only 2 decimal precision, so only 9000 possible angles. Try all and pick the one that comes closest. Need to be careful to pick the right solution when solution is between two hundreths of a degree. Might want to evaluate down to thousandths of a degree to be sure.