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

Trivial fix, histogram_zero_line_t being incorrect with scale_min < 0 and scale_max > 0 #4349

Conversation

filippocrocchini
Copy link
Contributor

It's a really small fix. I guess nobody has histograms with negative values.

min < 0
max > 0

0 at the top
1 at the bottom

zero_line_t = 1 - (-min / (max-min)) = 1 + min / (max - min)

@ocornut ocornut force-pushed the master branch 2 times, most recently from 0c1e5bd to bb6a60b Compare August 27, 2021 19:10
ocornut pushed a commit that referenced this pull request Aug 31, 2021
@ocornut
Copy link
Owner

ocornut commented Aug 31, 2021

Thank you for the PR. Merged as eb6c16d!

@ocornut ocornut closed this Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants