fix: round instead of floor in IngredientList
This commit is contained in:
@@ -5,7 +5,7 @@ import { unitsOfMeasure } from "@lib/parseIngredient.ts";
|
|||||||
|
|
||||||
function formatAmount(num: number) {
|
function formatAmount(num: number) {
|
||||||
if (num === 0) return "";
|
if (num === 0) return "";
|
||||||
return (Math.floor(num * 4) / 4).toString();
|
return (Math.round(num * 4) / 4).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatUnit(unit: string, amount: number) {
|
function formatUnit(unit: string, amount: number) {
|
||||||
|
|||||||
Reference in New Issue
Block a user