Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off-by-one error in defining the start and end of an XYEnvironment #1303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hal609
Copy link

@Hal609 Hal609 commented Oct 4, 2024

When a new XYEnvironment object is created it is given attributes hight and width which are then used to assign the attributes x_end and y_end. However, the x_end and y_end should be one less than the width as the positional index starts at one.

By fixing this it ensures that the is_inbounds returns the correct value and environments can correctly check if things are inbounds.

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

Successfully merging this pull request may close these issues.

1 participant