Skip to content

Commit 0eb13f5

Browse files
committed
Errata: Move to to first point in sequence.
1 parent 73e9c03 commit 0eb13f5

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

errata.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ Typo in the last sentence, it should read: *You should have
5555
no trouble creating some beautiful pictures or animations
5656
with trigonometry.*
5757

58+
### p. 82, p. 84
59+
60+
In examples `04-multi-curve-1.html` and
61+
`05-multi-curve-2.html`, the code to move to the first point
62+
should read: (Submitted by Gerald Cullen)
63+
64+
~~~
65+
context.beginPath();
66+
context.moveTo(points[0].x, points[0].y);
67+
~~~
68+
5869
### p. 111
5970

6071
A production error caused an errant graphic to obscure

examples/ch04/04-multi-curve-1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
//move to the first point
3131
context.beginPath();
32-
context.moveTo(points[0].x, points[1].y);
32+
context.moveTo(points[0].x, points[0].y);
3333
//and loop through each successive pair
3434
for (i = 1; i < numPoints; i += 2) {
3535
context.quadraticCurveTo(points[i].x, points[i].y,

examples/ch04/05-multi-curve-2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
//move to the first point
3131
context.beginPath();
32-
context.moveTo(points[0].x, points[1].y);
32+
context.moveTo(points[0].x, points[0].y);
3333
//curve through the rest, stopping at each midpoint
3434
for (i = 1; i < numPoints - 2; i++) {
3535
ctrlPoint.x = (points[i].x + points[i+1].x) / 2;

0 commit comments

Comments
 (0)