[poincare] Replace complex constructors by named constructors

Change-Id: I6aad82edfb1bd243c4537a48888655608b90eeb5
This commit is contained in:
Émilie Feral
2017-02-14 17:05:18 +01:00
parent 7cbfd37925
commit dc7a629dfa
32 changed files with 96 additions and 82 deletions

View File

@@ -47,10 +47,10 @@ Expression * AbsoluteValue::privateEvaluate(Context& context, AngleUnit angleUni
assert(evaluation->type() == Type::Matrix || evaluation->type() == Type::Complex);
if (evaluation->type() == Type::Matrix) {
delete evaluation;
return new Complex(NAN);
return new Complex(Complex::Float(NAN));
}
float absVal = ((Complex *)evaluation)->absoluteValue();
Complex * result = new Complex(absVal);
Complex * result = new Complex(Complex::Float(absVal));
delete evaluation;
return result;
}