mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 09:10:48 +01:00
[poincare] Fix bug in transpose
Change-Id: I0d6b9119ffee5d512a3e40f9cd166b1c8c55856a
This commit is contained in:
@@ -36,15 +36,7 @@ Expression * MatrixTranspose::privateEvaluate(Context& context, AngleUnit angleU
|
||||
Expression * evaluation = m_args[0]->evaluate(context, angleUnit);
|
||||
assert(evaluation->type() == Type::Matrix || evaluation->type() == Type::Complex);
|
||||
if (evaluation->type() == Type::Complex) {
|
||||
Expression * arguments[2];
|
||||
arguments[0] = new Complex(Complex::Float(2.0f));
|
||||
arguments[1] = evaluation;
|
||||
Expression * result = new Fraction(arguments, true);
|
||||
delete arguments[0];
|
||||
delete arguments[1];
|
||||
Expression * resultEvaluation = result->evaluate(context, angleUnit);
|
||||
delete result;
|
||||
return resultEvaluation;
|
||||
return evaluation;
|
||||
}
|
||||
Expression * transpose = ((Matrix *)evaluation)->createTranspose(context, angleUnit);
|
||||
delete evaluation;
|
||||
|
||||
Reference in New Issue
Block a user