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: allow values smaller than lowest threshold #60

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

romanoe
Copy link
Member

@romanoe romanoe commented Sep 10, 2024

Solves #58

@schmidni
Copy link
Member

schmidni commented Oct 7, 2024

Your implementation was correct, according to the email you sent, I looked at the logic for the conditions in LossScale.js. While correct, they were overly complicated.
I simplified them a bit - the result is, that the condition (index === 0) in getPercentage is not needed anymore, since we will not pass it a value smaller than the smallest threshold. However I would leave it in there, since the function is "correct" this way and functions as expected.

@schmidni schmidni removed their request for review October 7, 2024 10:11
@schmidni schmidni self-requested a review October 7, 2024 10:11
@romanoe romanoe merged commit ca0e7d1 into main Oct 7, 2024
@romanoe romanoe deleted the fix/lowest-threshold branch October 7, 2024 12:24
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