### Question:
BresenhamLine { public static void voxelTraversal( double y1, double x1, double y2, double x2, PointEmitter emitter ) { x1 = fix(x1); y1 = fix(y1); x2 = fix(x2); y2 = fix(y2); int x = (int) x1, y = (int) y1; int endX = (int) x2, endY = (int) y2; final double gridCellWidth = 1, gridCellHeight = 1; double deltaX = gridCellWidth / Math.abs(x2 - x1); int stepX = (int) Math.signum(x2 - x1); double tmp = frac(x1 / gridCellWidth); double maxX = deltaX * (1.0 - tmp); double deltaY = gridCellHeight / Math.abs(y2 - y1); int stepY = (int) Math.signum(y2 - y1); tmp = frac(y1 / gridCellHeight); double maxY = deltaY * (1.0 - tmp); boolean reachedY = false, reachedX = false; emitter.set(y, x); while (!(reachedX && reachedY)) { if (maxX < maxY) { maxX += deltaX; x += stepX; } else { maxY += deltaY; y += stepY; } emitter.set(y, x); if (stepX > 0.0) { if (x >= endX) reachedX = true; } else if (x <= endX) { reachedX = true; } if (stepY > 0.0) { if (y >= endY) reachedY = true; } else if (y <= endY) { reachedY = true; } } }  static void calcPoints( int y1, int x1, int y2, int x2,
                                   PointEmitter emitter ); static void voxelTraversal( double y1, double x1, double y2, double x2,
                                       PointEmitter emitter ); static void bresenham( int y1, int x1, int y2, int x2,
                                  PointEmitter emitter ); static void xiaolinWu( double y1, double x1, double y2, double x2,
                                  PointEmitter emitter ); static void calcPoints( final double lat1, final double lon1,
                                   final double lat2, final double lon2,
                                   final PointEmitter emitter,
                                   final double offsetLat, final double offsetLon,
                                   final double deltaLat, final double deltaLon );  }### Answer:
@Test public void testLineRightDown2() { BresenhamLine.voxelTraversal(0.25, 0.25, 2.75, 5.25, emitter); assertEquals(Helper.createPointList(0, 0, 0, 1, 1, 1, 1, 2, 1, 3, 2, 3, 2, 4, 2, 5), points); }