mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-26 09:44:32 +02:00
Merge pull request #115 from krofna/patch-2
Fix bug in pseudocode. The same variable was referred to using different identifiers
This commit is contained in:
@@ -30,11 +30,11 @@ And done, that's the algorithm implemented. That just leaves drawing the resulti
|
|||||||
```
|
```
|
||||||
function drawFlattenedCurve(curve, segmentCount):
|
function drawFlattenedCurve(curve, segmentCount):
|
||||||
coordinates = flattenCurve(curve, segmentCount)
|
coordinates = flattenCurve(curve, segmentCount)
|
||||||
coord = coordinates[0], _coords;
|
coord = coordinates[0], _coord;
|
||||||
for(i=1; i < coordinates.length; i++):
|
for(i=1; i < coordinates.length; i++):
|
||||||
_coords = coordinates[i]
|
_coord = coordinates[i]
|
||||||
line(coords, _coords)
|
line(coord, _coord)
|
||||||
coords = _coords
|
coord = _coord
|
||||||
```
|
```
|
||||||
|
|
||||||
We start with the first coordinate as reference point, and then just draw lines between each point and its next point.
|
We start with the first coordinate as reference point, and then just draw lines between each point and its next point.
|
||||||
|
Reference in New Issue
Block a user