nature-of-code / The-Nature-of-Code-archive

The very first build system for The Nature of Code

Home Page:http://natureofcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflicting velocity variable names in code accompanying Figure 2.5

tjunnone opened this issue · comments

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.

Fixed, thank you!