Skip to content
This repository has been archived by the owner on Jun 25, 2019. It is now read-only.

Missing explanation #134

Closed
PPrasai opened this issue Jun 11, 2017 · 1 comment
Closed

Missing explanation #134

PPrasai opened this issue Jun 11, 2017 · 1 comment

Comments

@PPrasai
Copy link

PPrasai commented Jun 11, 2017

In the first "Introduction" chapter, there is this piece of code to ascertain the next step of the Walker:

void step() {
    float stepx = random(-1, 1);
    float stepy = random(-1, 1);

    x += stepx;
    y += stepy;
}

For some reason, the next step is always drawn relatively to the top-left of current location and the Walker heads in the general direction towards the top-left of the window. Some explanation about why the Walker's behaving like that would be very much appreciated!

@shiffman
Copy link
Member

Addressed in noc-book-2 now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants