Skip to content

#circle checkEdges() error : chp01_vectors\NOC_1_7_motion101 #111

@ChinKeni

Description

@ChinKeni

we can add radius 24(48/2),display will be right
void checkEdges() {

if (position.x > width + 24) {
  position.x = 0;
} 
else if (position.x < 0 - 24) {
  position.x = width;
}

if (position.y > height + 24) {
  position.y = 0;
} 
else if (position.y < 0 - 24) {
  position.y = height;
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions