From f6ddc005b6f9174a8df53bcfdc77a30adf4ca4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 16 Aug 2019 16:42:58 +0200 Subject: [PATCH] [poincare] Remove wrong assert and comment --- poincare/src/expression.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/poincare/src/expression.cpp b/poincare/src/expression.cpp index 7df558b9a..abbc90206 100644 --- a/poincare/src/expression.cpp +++ b/poincare/src/expression.cpp @@ -536,7 +536,6 @@ void makePositive(Expression * e, bool * isNegative) { } void Expression::beautifyAndApproximateScalar(Expression * simplifiedExpression, Expression * approximateExpression, ExpressionNode::ReductionContext userReductionContext, Context * context, Preferences::ComplexFormat complexFormat, Preferences::AngleUnit angleUnit) { - assert(type() != ExpressionNode::Type::Matrix); /* Case 1: the reduced expression is ComplexCartesian or pure real, we can * take into account the complex format to display a+i*b or r*e^(i*th) */ if (type() == ExpressionNode::Type::ComplexCartesian || isReal(context)) { @@ -598,10 +597,10 @@ void Expression::simplifyAndApproximate(Expression * simplifiedExpression, Expre return; } // Step 2: we approximate and beautify the reduced expression - // si matrix à la racine, appeler simplifyAndApproximateOfScalar sur chaque entrée de la matrice, sinon appeler simplifyAndApproximateOfScalar de toi même /* Case 1: the reduced expression is a matrix: We scan the matrix children to * beautify them with the right complex format. */ if (e.type() == ExpressionNode::Type::Matrix) { + // TODO: this method enables to take the complex format into account when the result is a matrix of scalar. It won't work for nested matrices... Find a more elegant and general solution? Matrix m = static_cast(e); *simplifiedExpression = Matrix::Builder(); if (approximateExpression) {