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

Update image.go #3

Conversation

yosg
Copy link
Contributor

@yosg yosg commented Aug 6, 2023

Fix floating point calculation error.

When xMin>0 or yMin>0, it may cause calculation errors, such as float64(x)*xScale is 12.999999999999998, xMin is 364, int(float64(x)*xScale+float64(xMin)) will get the result 377, which expected 376.

Fix floating point calculation error.
@vitali-fedulov vitali-fedulov merged commit 8ce8881 into vitali-fedulov:master Aug 8, 2023
@vitali-fedulov
Copy link
Owner

Thanks for fixing!

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