mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 00:30:46 +01:00
Merge changes Icf56a238,I95999d57
* changes: [apps/shared] Fix bug: do not turn off editing mode when selection has not changed in editable cell table view controller [poincare] Correct trigo evalutation
This commit is contained in:
@@ -32,6 +32,9 @@ bool EditableCellTableViewController::textFieldDidFinishEditing(TextField * text
|
||||
}
|
||||
|
||||
void EditableCellTableViewController::tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY) {
|
||||
if (previousSelectedCellX == t->selectedColumn() && previousSelectedCellY == t->selectedRow()) {
|
||||
return;
|
||||
}
|
||||
if (cellAtLocationIsEditable(previousSelectedCellX, previousSelectedCellY)) {
|
||||
EvenOddEditableTextCell * myCell = (EvenOddEditableTextCell *)t->cellAtLocation(previousSelectedCellX, previousSelectedCellY);
|
||||
myCell->setEditing(false);
|
||||
|
||||
@@ -42,6 +42,12 @@ Expression * Cosine::privateEvaluate(Context& context, AngleUnit angleUnit) cons
|
||||
delete evaluation;
|
||||
return new Complex(Complex::Float(NAN));
|
||||
}
|
||||
/* Float case */
|
||||
if (((Complex *)evaluation)->b() == 0) {
|
||||
delete evaluation;
|
||||
return Function::privateEvaluate(context, angleUnit);
|
||||
}
|
||||
/* Complex case */
|
||||
Expression * arg = new Complex(Complex::Cartesian(-((Complex *)evaluation)->b(), ((Complex *)evaluation)->a()));
|
||||
Function * cosh = new HyperbolicCosine();
|
||||
cosh->setArgument(&arg, 1, true);
|
||||
|
||||
@@ -43,6 +43,12 @@ Expression * Sine::privateEvaluate(Context& context, AngleUnit angleUnit) const
|
||||
delete evaluation;
|
||||
return new Complex(Complex::Float(NAN));
|
||||
}
|
||||
/* Float case */
|
||||
if (((Complex *)evaluation)->b() == 0) {
|
||||
delete evaluation;
|
||||
return Function::privateEvaluate(context, angleUnit);
|
||||
}
|
||||
/* Complex case */
|
||||
Expression * arg = new Complex(Complex::Cartesian(-((Complex *)evaluation)->b(), ((Complex *)evaluation)->a()));
|
||||
Function * sinh = new HyperbolicSine();
|
||||
sinh->setArgument(&arg, 1, true);
|
||||
|
||||
@@ -44,6 +44,12 @@ Expression * Tangent::privateEvaluate(Context& context, AngleUnit angleUnit) con
|
||||
delete evaluation;
|
||||
return new Complex(Complex::Float(NAN));
|
||||
}
|
||||
/* Float case */
|
||||
if (((Complex *)evaluation)->b() == 0) {
|
||||
delete evaluation;
|
||||
return Function::privateEvaluate(context, angleUnit);
|
||||
}
|
||||
/* Complex case */
|
||||
Expression * arguments[2];
|
||||
arguments[0] = new Sine();
|
||||
((Function *)arguments[0])->setArgument(&evaluation, 1, true);
|
||||
|
||||
Reference in New Issue
Block a user