[poincare] Use '×' instead of '·' when pressing multiplication key

This commit is contained in:
Émilie Feral
2019-07-29 16:40:00 +02:00
parent 0d9629e226
commit d0fb30028e
2 changed files with 9 additions and 9 deletions

View File

@@ -110,7 +110,7 @@ QUIZ_CASE(equation_solve) {
// 3x^2-4x+4=2
const char * equations8[] = {"3×x^2-4x+4=2", 0};
const char * solutions8[] = {"(2)/(3)-(√(2))/(3)·𝐢","(2)/(3)+(√(2))/(3)·𝐢", "-8"};
const char * solutions8[] = {"(2)/(3)-(√(2))/(3)×𝐢","(2)/(3)+(√(2))/(3)×𝐢", "-8"};
assert_equation_system_exact_solve_to(equations8, EquationStore::Error::NoError, EquationStore::Type::PolynomialMonovariable, (const char **)variablesx, solutions8, 3);
// 2×x^2-4×x+4=3
@@ -130,7 +130,7 @@ QUIZ_CASE(equation_solve) {
// x^2+x+1=3×x^2+pi×x-√(5)
const char * equations11[] = {"x^2+x+1=3×x^2+π×x-√(5)", 0};
const char * solutions11[] = {"(√(π^\0222\023-2·π+8·√(5)+9)-π+1)/(4)", "(-√(π^\0222\023-2·π+8·√(5)+9)-π+1)/(4)", "π^\0222\023-2·π+8·√(5)+9"};
const char * solutions11[] = {"(√(π^\0222\023-2×π+8×√(5)+9)-π+1)/(4)", "(-√(π^\0222\023-2×π+8×√(5)+9)-π+1)/(4)", "π^\0222\023-2×π+8×√(5)+9"};
assert_equation_system_exact_solve_to(equations11, EquationStore::Error::NoError, EquationStore::Type::PolynomialMonovariable, (const char **)variablesx, solutions11, 3);
// TODO
@@ -218,11 +218,11 @@ QUIZ_CASE(equation_solve_complex_format) {
assert_equation_system_exact_solve_to(equations1, EquationStore::Error::NoError, EquationStore::Type::LinearSystem, (const char **)variablesx, solutions0, 1);
// x^2+x+1=0
const char * solutions2[] = {"-(1)/(2)-(√(3))/(2)·𝐢","-(1)/(2)+(√(3))/(2)·𝐢", "-3"};
const char * solutions2[] = {"-(1)/(2)-(√(3))/(2)×𝐢","-(1)/(2)+(√(3))/(2)×𝐢", "-3"};
assert_equation_system_exact_solve_to(equations2, EquationStore::Error::NoError, EquationStore::Type::PolynomialMonovariable, (const char **)variablesx, solutions2, 3);
// x^2-√(-1)=0
const char * solutions3[] = {"-(√(2))/(2)-(√(2))/(2)·𝐢", "(√(2))/(2)+(√(2))/(2)·𝐢","4·𝐢"};
const char * solutions3[] = {"-(√(2))/(2)-(√(2))/(2)×𝐢", "(√(2))/(2)+(√(2))/(2)×𝐢","4×𝐢"};
assert_equation_system_exact_solve_to(equations3, EquationStore::Error::NoError, EquationStore::Type::PolynomialMonovariable, (const char **)variablesx, solutions3, 3);
// x+√(-1)×√(-1) = 0
@@ -231,18 +231,18 @@ QUIZ_CASE(equation_solve_complex_format) {
Poincare::Preferences::sharedPreferences()->setComplexFormat(Poincare::Preferences::ComplexFormat::Polar);
// x+𝐢 = 0 --> x = e^(-π/2×i)
const char * solutions0Polar[] = {"^\x12-(π)/(2)·𝐢\x13"};
const char * solutions0Polar[] = {"^\x12-(π)/(2)×𝐢\x13"};
assert_equation_system_exact_solve_to(equations0, EquationStore::Error::NoError, EquationStore::Type::LinearSystem, (const char **)variablesx, solutions0Polar, 1);
// x+√(-1) = 0 --> x = e^(-π/2×𝐢)
assert_equation_system_exact_solve_to(equations1, EquationStore::Error::NoError, EquationStore::Type::LinearSystem, (const char **)variablesx, solutions0Polar, 1);
// x^2+x+1=0
const char * solutions2Polar[] = {"^\x12-(2·π)/(3)·𝐢\x13","^\x12(2·π)/(3)·𝐢\x13", "3·^\x12π·𝐢\x13"};
const char * solutions2Polar[] = {"^\x12-(2×π)/(3)×𝐢\x13","^\x12(2×π)/(3)×𝐢\x13", "3×^\x12π×𝐢\x13"};
assert_equation_system_exact_solve_to(equations2, EquationStore::Error::NoError, EquationStore::Type::PolynomialMonovariable, (const char **)variablesx, solutions2Polar, 3);
// x^2-√(-1)=0
const char * solutions3Polar[] = {"^\x12-(3·π)/(4)·𝐢\x13", "^\x12(π)/(4)·𝐢\x13", "4·^\x12(π)/(2)·𝐢\x13"};
const char * solutions3Polar[] = {"^\x12-(3×π)/(4)×𝐢\x13", "^\x12(π)/(4)×𝐢\x13", "4×^\x12(π)/(2)×𝐢\x13"};
assert_equation_system_exact_solve_to(equations3, EquationStore::Error::NoError, EquationStore::Type::PolynomialMonovariable, (const char **)variablesx, solutions3Polar, 3);
}

View File

@@ -116,7 +116,7 @@ void LayoutCursor::addEmptySquarePowerLayout() {
void LayoutCursor::addEmptyTenPowerLayout() {
EmptyLayout emptyLayout = EmptyLayout::Builder();
HorizontalLayout sibling = HorizontalLayout::Builder(
CodePointLayout::Builder(UCodePointMiddleDot),
CodePointLayout::Builder(UCodePointMultiplicationSign),
CodePointLayout::Builder('1'),
CodePointLayout::Builder('0'),
VerticalOffsetLayout::Builder(
@@ -154,7 +154,7 @@ void LayoutCursor::insertText(const char * text) {
continue;
}
if (codePoint == UCodePointMultiplicationSign) {
newChild = CodePointLayout::Builder(UCodePointMiddleDot);
newChild = CodePointLayout::Builder(UCodePointMultiplicationSign);
} else if (codePoint == '(') {
newChild = LeftParenthesisLayout::Builder();
if (pointedChild.isUninitialized()) {