This solution is based on the math by Paul Bourke, which was translated to javascript with
the conversion of the input into the correct coordinates.
Note that line 3 in both solution shows 4 insted of 3.
this may be due to the rounding affect of the computations.
Computed Results | Expected Output |
---|---|
-1 | -1 |
-1 | -1 |
4 | 3 |
2350 | 2350 |
The purpose of this option is to show that by simple research i was able to find a plugin that allowed the computation of the intersection point without having to translate a complex formula to javascript
Option 2 Results | Expected Output |
---|---|
-1 | -1 |
-1 | -1 |
4 | 3 |
2350 | 2350 |