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 issue with annotation at certain zooms #21

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

Carifio24
Copy link
Member

This PR aims to resolve #19. The root of the problem is that whether or not the Sun was entirely inside the Moon depended on the screen resolution - basically, a small sliver of the Sun not covered by the Moon would be lost at low zoom due to screen resolution. This, combined with the fact that we'd already changed the Sun-Moon distance calculation to use a more precise method meant that we were trying to solve a screen-space describing the intersection of the circles, when no such intersection existed.

The solution here is to essentially free ourselves of some of the resolution-based issues by using the fraction pixel values where the sun and moon centers "should" be. This should keep everything in agreement and allow us to "know" that the Sun isn't completely covered by the Moon, even when the resolution of the annotation on the screen says otherwise.

@patudom patudom merged commit 4ff7848 into cosmicds:main Jan 30, 2024
1 check passed
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.

sqrDisc is NaN error
2 participants