Question Infrastructure

There is still a hidden multiply inside of our inner loop

    /**
     *  Sets a pixel to a given value
     */
    public final boolean setPixel(int pix, int x, int y)
    {
        pixel[y*width+x] = pix;
        return true;
    }


Our next optimization of Bresenham's algorithm
eliminates even this multiply.
Lecture 5 Slide 19 6.837 Fall '98