It uses discrete differential error tracking to determine how far y is from a linear function: f(x) = slope * x. The change of the error's sign tells us when to increment y (e.g.: emit an event to move up one pixel). This technique can be extended to any polynomial by cascading errors for each derivative. It is a robust, iterative solution that guarantees correctness and repeatability over intervals of slope.numerator * slope.denominator."