mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 19:49:58 +02:00
[poincare] Enable functions with more than one argument
Change-Id: I543594072c37716fffcc54d5d6ba9b6b3499bcd1
This commit is contained in:
@@ -18,11 +18,11 @@ Expression * AbsoluteValue::cloneWithDifferentOperands(Expression** newOperands,
|
||||
int numberOfOperands, bool cloneOperands) const {
|
||||
assert(numberOfOperands == 1);
|
||||
assert(newOperands != nullptr);
|
||||
AbsoluteValue * c = new AbsoluteValue();
|
||||
c->setArgument(*newOperands, cloneOperands);
|
||||
return c;
|
||||
AbsoluteValue * a = new AbsoluteValue();
|
||||
a->setArgument(newOperands, numberOfOperands, cloneOperands);
|
||||
return a;
|
||||
}
|
||||
|
||||
float AbsoluteValue::approximate(Context& context) const {
|
||||
return fabsf(m_arg->approximate(context));
|
||||
return fabsf(m_args[0]->approximate(context));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user