Skip to content

small bugfix in roundPixels so it now also works smoothly with hires enabled#209

Open
stephanvermeire wants to merge 2 commits into
ekelokorpi:masterfrom
stephanvermeire:master
Open

small bugfix in roundPixels so it now also works smoothly with hires enabled#209
stephanvermeire wants to merge 2 commits into
ekelokorpi:masterfrom
stephanvermeire:master

Conversation

@stephanvermeire

Copy link
Copy Markdown
Contributor

Sprites now move really with one pixel at a time then roundPixels=true exabled.

@ekelokorpi

Copy link
Copy Markdown
Owner

Thanks for the PR! All pull requests should go to the develop branch: https://github.com/ekelokorpi/panda-engine/tree/develop

Could you explain your code changes a bit? I'm not sure if i understand it correctly.

For example this new line:
tx = Math.round(tx * game.scale)/game.scale;

Now if the game.scale value is 2, that line would not change the value at all, so it's doing the rounding for nothing?

Example:
Math.round(1.5 * 2) / 2 would result value 1.5

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.

2 participants