mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 01:00:50 +01:00
[apps/calculation] additional_outputs: TrigonometryListController set
the right angle model to the view
This commit is contained in:
@@ -7,13 +7,16 @@ namespace Calculation {
|
||||
|
||||
void TrigonometryListController::setExpression(Poincare::Expression e) {
|
||||
IllustratedListController::setExpression(e.childAtIndex(0));
|
||||
//TODO
|
||||
//m_model.setAngle(std::complex<float>(1.2f,2.3f));
|
||||
|
||||
// Fill calculation store
|
||||
Poincare::Context * context = App::app()->localContext();
|
||||
m_calculationStore.push("sin(θ)", context);
|
||||
m_calculationStore.push("cos(θ)", context);
|
||||
m_calculationStore.push("θ", context);
|
||||
|
||||
// Set trigonometry illustration
|
||||
float angle = Shared::PoincareHelpers::ApproximateToScalar<float>(m_calculationStore.calculationAtIndex(0)->approximateOutput(context), context);
|
||||
m_model.setAngle(angle);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user