mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] Add unitFormat to ReductionContext
Change-Id: I1d3fcd2f47c973c041e1be84e9a902dd58de3562
This commit is contained in:
committed by
Émilie Feral
parent
6c676782aa
commit
fad375c11c
@@ -1,4 +1,5 @@
|
||||
#include "equation.h"
|
||||
#include <apps/global_preferences.h>
|
||||
#include <apps/shared/poincare_helpers.h>
|
||||
#include <poincare/constant.h>
|
||||
#include <poincare/empty_context.h>
|
||||
@@ -49,7 +50,7 @@ Expression Equation::Model::standardForm(const Storage::Record * record, Context
|
||||
*returnedExpression = Undefined::Builder();
|
||||
} else if (expressionRed.type() == ExpressionNode::Type::Equal) {
|
||||
Preferences * preferences = Preferences::sharedPreferences();
|
||||
*returnedExpression = static_cast<const Equal&>(expressionRed).standardEquation(contextToUse, Expression::UpdatedComplexFormatWithExpressionInput(preferences->complexFormat(), expressionInputWithoutFunctions, contextToUse), preferences->angleUnit());
|
||||
*returnedExpression = static_cast<const Equal&>(expressionRed).standardEquation(contextToUse, Expression::UpdatedComplexFormatWithExpressionInput(preferences->complexFormat(), expressionInputWithoutFunctions, contextToUse), preferences->angleUnit(), GlobalPreferences::sharedGlobalPreferences()->unitFormat());
|
||||
} else {
|
||||
assert(expressionRed.type() == ExpressionNode::Type::Rational && static_cast<const Rational&>(expressionRed).isOne());
|
||||
// The equality was reduced which means the equality was always true.
|
||||
|
||||
Reference in New Issue
Block a user