Skip to content

Commit

Permalink
use AlmostEq to compare compositions
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearkatie committed Jul 31, 2024
1 parent 02ee502 commit b60a66c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/toolkit/matl_sell_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ void MatlSellPolicy::GetMatlTrades(
trade_mat = mat;
}

if (ignore_comp_ && it->request->target()->comp() != trade_mat->comp()) {
if (ignore_comp_ && !AlmostEq(it->request->target()->comp(), trade_mat->comp())) {
trade_mat->Transmute(it->request->target()->comp());
}
responses.push_back(std::make_pair(*it, trade_mat));
Expand Down

0 comments on commit b60a66c

Please sign in to comment.