3 ms·
If you write out the coordinates for a straight line from the origin they look like this: 3, 5; 6, 10; 9, 15... So now, instead of having to test 6, 10 an
by oisdk 7y ago
If you write out the coordinates for a straight line from the origin they look like this:
3, 5; 6, 10; 9, 15...
So now, instead of having to test 6, 10 and 9, 15 when we see it, we can just test 3, 5 once and we'll know the answer to all of the points on that line. Then, to answer the question "which line is this point on?" we simplify the fraction (i.e. 2, 6 -> 1, 3).