Skip to content

First point in the Bresenham's algorithm may be drawn twice #1

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

Open
silensrunners opened this issue Jan 20, 2022 · 1 comment
Open

Comments

@silensrunners
Copy link

Hello!

First of all thanks a lot for the implementations, they are really useful.

I think though, that the call to the CirclePlotPoints made in the Bresenham's algorithm.
CirclePlotPoints(x_centre, y_centre, x, y)
x += 1
needs to be called AFTER increasing "x".
x += 1
CirclePlotPoints(x_centre, y_centre, x, y)
Otherwise, since the function is calling CirclePlotPoints at the beginning it is possible that the same point will be drawn twice.

BR,
Ixent.

@HuluWZ
Copy link
Owner

HuluWZ commented Mar 26, 2022

ur right bro ,i will fix that @silensrunners 🙏

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

No branches or pull requests

2 participants