add comment for a specification of this code
This commit is contained in:
-3
@@ -1,11 +1,8 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
|
||||||
using Francesco.Recipes.World.Data;
|
using Francesco.Recipes.World.Data;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,8 @@
|
|||||||
finalQuantity = Math.round(adjustedQuantity);
|
finalQuantity = Math.round(adjustedQuantity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Convert small unit "msp" (pinch) to teaspoons (TL) for a better estimate
|
||||||
|
// 4 pinches = about 1 TL → show that as a note, rounded to 1 decimal
|
||||||
else if (specialUnits.smallUnits.includes(unitSymbol)) {
|
else if (specialUnits.smallUnits.includes(unitSymbol)) {
|
||||||
if (adjustedQuantity > 3) {
|
if (adjustedQuantity > 3) {
|
||||||
finalQuantity = Math.round(adjustedQuantity / 4 * 10) / 10;
|
finalQuantity = Math.round(adjustedQuantity / 4 * 10) / 10;
|
||||||
|
|||||||
Reference in New Issue
Block a user