Skip to content

Chapter 2 inexplicably drops the topspeed functionality #1111

@sidwellr

Description

@sidwellr

On page 83 is the statement "This is where I left the Mover class. Notice that it’s identical to the Mover class created in Chapter 1, with two additions, mass and a new applyForce() method". This is not quite correct: the Mover class in Chapter 1 had a topspeed variable used to limit the velocity magnitude; the Mover class in Chapter 2 omits this without explanation. Once opposing forces like friction and gravity are introduced later in the chapter, they will put a natural limit on the speed and topspeed needs to be dropped. But in Examples 2.1, 2.2, and 2.3 it is possible to accelerate the Movers to a very high speed by activating the wind at just the right times!

This is minor, and revving the movers in those examples to super speeds can be quite fun! But silently removing topspeed from the Mover class might be confusing for readers who are building their own classes based on the text rather than copying your examples. (You do discuss this briefly on page 219.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions