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

check that resolution is at least as big as burger #258

Merged
merged 1 commit into from
Jun 24, 2018

Conversation

dirk-thomas
Copy link
Member

Fixes #254.

The first check ensures that the resolution is at least big enough to contain the burger template.

Additionally the initialization avoids a division by zero and the "bouncing" sacrifices "accuracy" over staying in bound in very constraint sizes.

@dirk-thomas dirk-thomas added bug Something isn't working in review Waiting for review (Kanban column) labels Jun 22, 2018
@dirk-thomas dirk-thomas self-assigned this Jun 22, 2018
@dirk-thomas dirk-thomas requested a review from sloretz June 22, 2018 23:03
@dhood dhood added the in progress Actively being worked on (Kanban column) label Jun 22, 2018
if (x[b] < 0) {
x[b] = 0;
} else {
x[b] = width_i - burger_template.size().width;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like x_inc[b] is unused?

Copy link
Member Author

@dirk-thomas dirk-thomas Jun 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, it just truncates the movement at the border. It had already been moved in line 133.

@dirk-thomas dirk-thomas removed the in progress Actively being worked on (Kanban column) label Jun 22, 2018
@dirk-thomas dirk-thomas merged commit f5d170a into master Jun 24, 2018
@dirk-thomas dirk-thomas deleted the error_msg_lower_than_burger_resolution branch June 24, 2018 20:32
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants