For every point we need to compare the slope to every other point and remember the most that are the same. The obvious way to calculate slope is y/x but that could suffer from floating point rounding errors when comparing slopes. A more accurate way is to remember x and y values and compare them as a whole. However we need to make sure x and y are simplified to their lowest common denominators, so we need gcd.
-
Recent Posts
Recent Comments
Archives
Categories
Meta