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: recipe scaling #4324

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

Kuchenpirat
Copy link
Collaborator

What type of PR is this?

  • bug

What this PR does / why we need it:

This update changes the scale value of the recipe scaler to be rounded to 32 digits instead of 3. This addresses an issue where scaling a larger number up or down by one (e.g. 24 -> 23) would result in a rounded number (e.g. 22.992 instead of 23) rather than the correct value. Since the scale is based on 1 and the servings are calculated by multiplying the scale by the number of servings, more precise rounding is required. The value 32 is chosen to match the precision used in the backend for numbers requiring greater accuracy.

Which issue(s) this PR fixes:

None

@github-actions github-actions bot added the bugfix label Oct 7, 2024
@michael-genson michael-genson enabled auto-merge (squash) October 7, 2024 16:28
@michael-genson michael-genson merged commit 56bd68d into mealie-recipes:mealie-next Oct 7, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants