fix: round instead of floor in IngredientList

This commit is contained in:
2026-01-08 16:43:55 +01:00
parent 7dda2dd60d
commit e65938ecc2

View File

@@ -5,7 +5,7 @@ import { unitsOfMeasure } from "@lib/parseIngredient.ts";
function formatAmount(num: number) {
if (num === 0) return "";
return (Math.floor(num * 4) / 4).toString();
return (Math.round(num * 4) / 4).toString();
}
function formatUnit(unit: string, amount: number) {