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

The very first build system for The Nature of Code
http://natureofcode.com
914 stars 151 forks source link

Conflicting velocity variable names in code accompanying Figure 2.5 #303

Closed tjunnone closed 8 years ago

tjunnone commented 11 years ago

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 8 years ago

Fixed, thank you!