From 1f18269960f9681dccb6f084438a580445145adb Mon Sep 17 00:00:00 2001 From: David Chapman Date: Mon, 1 Mar 2021 21:09:13 -0600 Subject: [PATCH] fixes nearly 20-year-old bug in EB-AFIT packing algorithm --- src/CromulentBisgetti.ContainerPacking/Algorithms/EB_AFIT.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CromulentBisgetti.ContainerPacking/Algorithms/EB_AFIT.cs b/src/CromulentBisgetti.ContainerPacking/Algorithms/EB_AFIT.cs index 416d234..c10292c 100644 --- a/src/CromulentBisgetti.ContainerPacking/Algorithms/EB_AFIT.cs +++ b/src/CromulentBisgetti.ContainerPacking/Algorithms/EB_AFIT.cs @@ -938,7 +938,7 @@ namespace CromulentBisgetti.ContainerPacking.Algorithms if (smallestZ.CumZ + cboxz == smallestZ.Pre.CumZ) { smallestZ.CumX = smallestZ.CumX - cboxx; - itemsToPack[cboxi].CoordX = smallestZ.CumX - cboxx; + itemsToPack[cboxi].CoordX = smallestZ.CumX; } else {