Ver Fonte

修复单变量求解

xujunjie há 1 ano atrás
pai
commit
499d3eb22e
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/utils/GoalSeek.js

+ 2 - 2
src/utils/GoalSeek.js

@@ -34,7 +34,7 @@ export default async function GoalSeek(options) {
     res = await fn(...copyParams);
     if (res > goal) {
       minGuest -= oldGuess / 2;
-      await getMin(minGuest);
+      return await getMin(minGuest);
     }
     return minGuest;
   }
@@ -45,7 +45,7 @@ export default async function GoalSeek(options) {
     res = await fn(...copyParams);
     if (res < goal) {
       maxGuest += oldGuess / 2;
-      await getMax(maxGuest);
+      return await getMax(maxGuest);
     }
     return maxGuest;
   }