fix: Use min for guaranteed minimum

Should be, max of mins for each pattern, then min of those
master
Mike Bryant 4 years ago
parent f8319bb348
commit 46929bd556

@ -666,7 +666,7 @@ function analyze_possibilities(sell_prices, first_buy, previous_pattern) {
pattern_description: "All patterns",
pattern_number: 4,
prices: global_min_max,
weekGuaranteedMinimum: Math.max(...generated_possibilities.map(poss => poss.weekGuaranteedMinimum)),
weekGuaranteedMinimum: Math.min(...generated_possibilities.map(poss => poss.weekGuaranteedMinimum)),
weekMax: Math.max(...generated_possibilities.map(poss => poss.weekMax)),
});

Loading…
Cancel
Save