Skip to content

Commit

Permalink
Use make_MathFn and round directly for single argument case
Browse files Browse the repository at this point in the history
Co-authored-by: Bertrand Coconnier <[email protected]>
  • Loading branch information
seanmcleod and bcoconni authored Oct 8, 2024
1 parent 27b0a64 commit 91b08e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math/FGFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void FGFunction::Load(Element* el, FGPropertyValue* var, FGFDMExec* fdmex,
return round((p[0]->GetValue() / multiple)) * multiple;
};
if (element->GetNumElements() == 1)
Parameters.push_back(new aFunc<decltype(f), 1>(f, fdmex, element, Prefix, var));
Parameters.push_back(make_MathFn(round, fdmex, element, Prefix, var));
else
Parameters.push_back(new aFunc<decltype(f), 2>(f, fdmex, element, Prefix, var));
} else if (operation == "atan2") {
Expand Down

0 comments on commit 91b08e5

Please sign in to comment.