Add Bresenham Line in Javascript