Conflicting velocity variable names in code accompanying Figure 2.5
tjunnone opened this issue · 1 comments
tjunnone commented
Under Figure 2.5 is the following code:
float speed = v.mag();
float dragMagnitude = c * speed * speed;
PVector drag = velocity.get();
The first line should read "float speed = velocity.mag();" in order to be consistent with the last line of the above quoted code. This also makes it consistent with the code repeated in Example 2.5.
shiffman commented
Fixed, thank you!