Skip to content

Commit 31882e5

Browse files
committed
Method returns array of objects instead of array of arrays
1 parent 9cdd359 commit 31882e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/geom/line/BresenhamPoints.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var BresenhamPoints = function (line, stepRate, results)
2727
var sy = (y1 < y2) ? 1 : -1;
2828
var err = dx - dy;
2929

30-
results.push([ x1, y1 ]);
30+
results.push({ x: x1, y: y1 });
3131

3232
var i = 1;
3333

@@ -49,7 +49,7 @@ var BresenhamPoints = function (line, stepRate, results)
4949

5050
if (i % stepRate === 0)
5151
{
52-
results.push([ x1, y1 ]);
52+
results.push({ x: x1, y: y1 });
5353
}
5454

5555
i++;

0 commit comments

Comments
 (0)