Please report any errors to author@gamealgorithms.net.
Chapter 1
- On page 14, the discussion regarding the “diamond problem” is short, and potentially misleading. The problem specifically refers to the issue where both parent classes implement the same grandparent function. The example as written does not have any grandparent functions overloaded. However, I would still strongly encouraging staying away from diamond hierarchies, even if they do not explicitly invoke the problem. (Found by Silas Snider)
Chapter 2
- On page 31, the first pseudocode entry has an line that says screenCount++. However, screenCount should actually be hCount. (Found by Gurman Gill)
Chapter 3
- On page 54, the first sentence of the third paragraph should read “The vector c(hat)”… (Found by Gurman Gill)
- On page 55, the first paragraph says “position your index finger along c(hat) and your middle finger along c(hat)”. However, the middle finger should be positioned along n(hat). (Found by Gurman Gill)
Chapter 4
- On page 84, there are two references to Figure 4.13(a), but they should be references to Figure 4.15(a). (Found by Bikramjit Goraya)
Chapter 7
- On page 141, in Listing 7.5, the variable d in the return statement should actually be p.d (that is, the d that is defined for the plane passed into the function). (Found by Shaun Gilchrist)
Chapter 10
- On page 216, there are two errors in the pseudocode. First, the crossResult variable should be the cross product between playerFacing3D and Vector3(0,1,0). Not Vector2. The playerToEnemy rotation line shoudl also read playerToEnemy = Rotate2D(playerToEnemy, angle). (Found by Gurman Gill)
Appendix A
- On Page 291, the answer to question #4 should be rotating by 90 degrees, not 45 degrees. (Found by Bikramjit Goraya)