[poincare] Enbale to evaluate expression in degrees or radian

Change-Id: I8b08e7fa93431817559a594a1ea03d4414f0c830
This commit is contained in:
Émilie Feral
2017-02-01 16:07:56 +01:00
parent 8d30d3fd0a
commit 42e4cf408d
55 changed files with 211 additions and 193 deletions

View File

@@ -9,6 +9,8 @@ VariableContext::VariableContext(char name, ::Context * parentContext) :
void VariableContext::setExpressionForSymbolName(Expression * expression, const Symbol * symbol) {
if (symbol->name() == m_name) {
/* WARNING: we here assume that the expression does not content any function
* whose evaluation depends on the angle unit */
m_value = Float(expression->approximate(*m_parentContext));
} else {
m_parentContext->setExpressionForSymbolName(expression, symbol);