From 39b2bb9d615cfff1a831cf585a1eae85f4065da1 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Mon, 5 Jan 2026 17:14:28 +0100 Subject: [PATCH] fix(commons/scaling): delegate scaleBy(int) to scaleBy(double) impl --- commons/src/main/java/commons/FormalIngredient.java | 7 +------ commons/src/main/java/commons/Scalable.java | 4 +++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/commons/src/main/java/commons/FormalIngredient.java b/commons/src/main/java/commons/FormalIngredient.java index 32e5838..19f514c 100644 --- a/commons/src/main/java/commons/FormalIngredient.java +++ b/commons/src/main/java/commons/FormalIngredient.java @@ -52,14 +52,9 @@ public class FormalIngredient extends RecipeIngredient implements Scalable { - IngredientType scaleBy(int numPortions); + default IngredientType scaleBy(int numPortions) { + return scaleBy((double) numPortions); + }; IngredientType scaleBy(double factor); }