Simplify bresenham a bit and add a way to terminate early