From 488c5b000d785821b6d2e9cf9b0393cfe9547828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Bla=C5=BEevi=C4=87?= Date: Sat, 13 May 2017 01:27:03 +0200 Subject: [PATCH 1/2] Update content.en-GB.md --- components/sections/flattening/content.en-GB.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sections/flattening/content.en-GB.md b/components/sections/flattening/content.en-GB.md index c1feb622..4678601c 100644 --- a/components/sections/flattening/content.en-GB.md +++ b/components/sections/flattening/content.en-GB.md @@ -30,7 +30,7 @@ And done, that's the algorithm implemented. That just leaves drawing the resulti ``` function drawFlattenedCurve(curve, segmentCount): coordinates = flattenCurve(curve, segmentCount) - coord = coordinates[0], _coords; + coords = coordinates[0], _coords; for(i=1; i < coordinates.length; i++): _coords = coordinates[i] line(coords, _coords) From 56100fff179796d84a5989be9180c561c4a72109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Bla=C5=BEevi=C4=87?= Date: Sat, 13 May 2017 23:05:05 +0200 Subject: [PATCH 2/2] Update content.en-GB.md --- components/sections/flattening/content.en-GB.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/sections/flattening/content.en-GB.md b/components/sections/flattening/content.en-GB.md index 4678601c..2c345935 100644 --- a/components/sections/flattening/content.en-GB.md +++ b/components/sections/flattening/content.en-GB.md @@ -30,11 +30,11 @@ And done, that's the algorithm implemented. That just leaves drawing the resulti ``` function drawFlattenedCurve(curve, segmentCount): coordinates = flattenCurve(curve, segmentCount) - coords = coordinates[0], _coords; + coord = coordinates[0], _coord; for(i=1; i < coordinates.length; i++): - _coords = coordinates[i] - line(coords, _coords) - coords = _coords + _coord = coordinates[i] + line(coord, _coord) + coord = _coord ``` We start with the first coordinate as reference point, and then just draw lines between each point and its next point.