This test can be made against a value of zero if the inital value of scaledFraction has 2*dx subtracted from it. Giving, outside the loop:OffsetScaledFraction = dx + 2*dy - 2*dx = 2*dy - dxand the inner loop becomes |
||||||
| Lecture 4 | Slide 15 | 6.837 Fall '01 | ||||