Another option for calculating the exit position

use the law of sines to calculate the exit position instead of an iterative approach.
Merge pull request #1 from vishvananda/patch-1

Another option for calculating the exit position