mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[poincare] Enbale to evaluate expression in degrees or radian
Change-Id: I8b08e7fa93431817559a594a1ea03d4414f0c830
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user