Errata, Chapter 3
p. 321, Figure
| Printed: | c.potentialAt(x, y) |
| Fixed: | c1.potentialAt(x, y) |
p. 350, Program 3.1.11
| Printed: | // Split file by column into M+1 files. |
| Fixed: | // Split file by column into N files. |
p. 362, Program 3.1.1
| Printed: | Value of charges not specified. |
| Fixed: | Assume value of charges is 1.0 for each Charge. |
p. 368, Exercise 3.1.38
| Printed: | wrong rotation formula |
| Fixed: | ti = (si - ci) cos(theta) - (sj - cj) sin(theta) + ci tj = (si - ci) sin(theta) + (sj - cj) cos(theta) + cj |
p. 379
| Printed: | Program 3.2.2 |
| Fixed: | Add trailing } to main() |
p. 380
| Printed: | Its private draw() method scales |
| Fixed: | Its draw() method scales |
p. 381
| Printed: | Program 3.2.3 |
| Fixed: | Better style: remove call to draw() in addDataPoint(). |
p. 381, Program 3.2.3
| Printed: | private void draw() |
| Fixed: | public void draw() |
p. 383
| Printed: | adds the step size times the sine ... step size times the cosine |
| Fixed: | adds the step size times the cosine ... step size times the sine |
p. 385
| Printed: | turn right 60 degrees (left -120 degrees) |
| Fixed: | turn right 120 degrees (left -120 degrees) |
p. 421
| Printed: | theta = atan(re / im) |
| Fixed: | theta = Math.atan2(im, re) |
p. 421
| Printed: | b.im |
| Fixed: | b.im() |
p. 434
| Printed: | if a is less than b, then b must be less than a |
| Fixed: | if a is less than b, then b must be greater than a |
p. 436
| Printed: | public Counter implements |
| Fixed: | public class Counter implements |
p. 437
| Printed: | "integrate(Gaussian.phi(), a, b) |
| Fixed: | "integrate(Gaussian.phi(), a, b, N) |
p. 443
| Printed: | (x0-y0)^2 + (x0-y0)^2 + ... |
| Fixed: | (x0-y0)^2 + (x1-y1)^2 + ... |
p. 451, Exercise 3.3.12
| Printed: | two-dimensional vectors |
| Fixed: | two-dimensional unit vectors |
p. 457
| Printed: | Vector (Program 3.3.4) |
| Fixed: | Vector (Program 3.3.3) |
p. 458
| Printed: | Body (Program 3.4.5) |
| Fixed: | Vector (Program 3.4.1) |
