Prechádzať zdrojové kódy

修复单变量求解

xujunjie 1 rok pred
rodič
commit
499d3eb22e
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  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;
   }