| 169 | // sin, cos, exp, etc. |
| 170 | |
| 171 | FGFunction* make_MathFn(double(*math_fn)(double), FGFDMExec* fdmex, Element* el, |
| 172 | const string& prefix, FGPropertyValue* v) |
| 173 | { |
| 174 | auto f = [math_fn](const std::vector<FGParameter_ptr> &p)->double { |
| 175 | return math_fn(p[0]->GetValue()); |
| 176 | }; |
| 177 | return new aFunc<decltype(f), 1>(f, fdmex, el, prefix, v); |
| 178 | } |
| 179 | |
| 180 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 181 | // Manage the functions with a variable number of arguments. |