Midpoint line decision
= Midpoint line decision
{title2=$d=2f(x+1,y+1/2)$}
For the <implicit equation> $f(X,Y)=\Delta y(X-x_0)-\Delta x(Y-y_0)$, the sign of $d$ compares the exact <line> with the midpoint between candidate <pixel> centres $(x+1,y)$ and $(x+1,y+1)$. Multiplication by two makes the test integral. A consistent equality rule specifies which tied <pixel> is selected.