From ca91b7c43dd1a4ccd5d765779eb741ee8e7a62c1 Mon Sep 17 00:00:00 2001 From: Hugo Saint-Vignes Date: Tue, 21 Jul 2020 10:40:21 +0200 Subject: [PATCH] [apps/toolbox] Add Vector operation toolbox menus Change-Id: Iab8faa45a3f30be979f7d705ac169e8f2b801da9 --- apps/math_toolbox.cpp | 7 +++++++ apps/shared.universal.i18n | 3 +++ apps/toolbox.de.i18n | 4 ++++ apps/toolbox.en.i18n | 4 ++++ apps/toolbox.es.i18n | 4 ++++ apps/toolbox.fr.i18n | 4 ++++ apps/toolbox.it.i18n | 4 ++++ apps/toolbox.nl.i18n | 4 ++++ apps/toolbox.pt.i18n | 4 ++++ 9 files changed, 38 insertions(+) diff --git a/apps/math_toolbox.cpp b/apps/math_toolbox.cpp index 49b9c62f9..ec1d8a8cc 100644 --- a/apps/math_toolbox.cpp +++ b/apps/math_toolbox.cpp @@ -76,6 +76,12 @@ const ToolboxMessageTree matricesChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::ReducedRowEchelonFormCommandWithArg, I18n::Message::ReducedRowEchelonForm) }; +const ToolboxMessageTree vectorsChildren[] = { + ToolboxMessageTree::Leaf(I18n::Message::DotCommandWithArg, I18n::Message::Dot), + ToolboxMessageTree::Leaf(I18n::Message::CrossCommandWithArg, I18n::Message::Cross), + ToolboxMessageTree::Leaf(I18n::Message::NormVectorCommandWithArg, I18n::Message::NormVector), +}; + #if LIST_ARE_DEFINED const ToolboxMessageTree listsChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::SortCommandWithArg, I18n::Message::Sort), @@ -286,6 +292,7 @@ const ToolboxMessageTree menu[] = { ToolboxMessageTree::Node(I18n::Message::Probability, probabilityChildren), ToolboxMessageTree::Node(I18n::Message::Arithmetic, arithmeticChildren), ToolboxMessageTree::Node(I18n::Message::Matrices, matricesChildren), + ToolboxMessageTree::Node(I18n::Message::Vectors, vectorsChildren), #if LIST_ARE_DEFINED ToolboxMessageTree::Node(I18n::Message::Lists,listsChildren), #endif diff --git a/apps/shared.universal.i18n b/apps/shared.universal.i18n index ec4eeffd9..7542b995e 100644 --- a/apps/shared.universal.i18n +++ b/apps/shared.universal.i18n @@ -94,12 +94,14 @@ CodeApp = "Python" ConfidenceCommandWithArg = "confidence(f,n)" ConjCommandWithArg = "conj(z)" CoshCommandWithArg = "cosh(x)" +CrossCommandWithArg = "cross(u,v)" D = "d" DeterminantCommandWithArg = "det(M)" DiffCommandWithArg = "diff(f(x),x,a)" DiffCommand = "diff(\x11,x,\x11)" DimensionCommandWithArg = "dim(M)" DiscriminantFormulaDegree2 = "Δ=b^2-4ac" +DotCommandWithArg = "dot(u,v)" E = "e" Equal = "=" FactorCommandWithArg = "factor(n)" @@ -130,6 +132,7 @@ N = "n" NormCDFCommandWithArg = "normcdf(a,μ,σ)" NormCDF2CommandWithArg = "normcdf2(a,b,μ,σ)" NormPDFCommandWithArg = "normpdf(x,μ,σ)" +NormVectorCommandWithArg = "norm(u)" PermuteCommandWithArg = "permute(n,r)" P = "p" Prediction95CommandWithArg = "prediction95(p,n)" diff --git a/apps/toolbox.de.i18n b/apps/toolbox.de.i18n index 840139815..8e410a7f1 100644 --- a/apps/toolbox.de.i18n +++ b/apps/toolbox.de.i18n @@ -136,6 +136,10 @@ Trace = "Spur" Dimension = "Größe" RowEchelonForm = "Stufenform" ReducedRowEchelonForm = "Reduzierte Stufenform" +Vectors = "Vektoren" +Dot = "Skalarprodukt" +Cross = "Kreuzprodukt" +NormVector = "Norm" Sort = "Sortieren aufsteigend" InvSort = "Sortieren absteigend" Maximum = "Maximalwert" diff --git a/apps/toolbox.en.i18n b/apps/toolbox.en.i18n index a6adecaf6..c8c295608 100644 --- a/apps/toolbox.en.i18n +++ b/apps/toolbox.en.i18n @@ -136,6 +136,10 @@ Trace = "Trace" Dimension = "Size" RowEchelonForm = "Row echelon form" ReducedRowEchelonForm = "Reduced row echelon form" +Vectors = "Vectors" +Dot = "Dot product" +Cross = "Cross product" +NormVector = "Norm" Sort = "Sort ascending " InvSort = "Sort descending" Maximum = "Maximum" diff --git a/apps/toolbox.es.i18n b/apps/toolbox.es.i18n index b9b245577..73410e367 100644 --- a/apps/toolbox.es.i18n +++ b/apps/toolbox.es.i18n @@ -136,6 +136,10 @@ Trace = "Traza" Dimension = "Tamaño" RowEchelonForm = "Matriz escalonada" ReducedRowEchelonForm = "Matriz escalonada reducida" +Vectors = "Vectores" +Dot = "Producto escalar" +Cross = "Producto vectorial" +NormVector = "Norma" Sort = "Clasificación ascendente" InvSort = "Clasificación descendente" Maximum = "Máximo" diff --git a/apps/toolbox.fr.i18n b/apps/toolbox.fr.i18n index 06c358f94..88b640b11 100644 --- a/apps/toolbox.fr.i18n +++ b/apps/toolbox.fr.i18n @@ -136,6 +136,10 @@ Trace = "Trace de M" Dimension = "Taille de M" RowEchelonForm = "Forme échelonnée de M" ReducedRowEchelonForm = "Forme échelonnée réduite de M" +Vectors = "Vecteurs" +Dot = "Produit scalaire" +Cross = "Produit vectoriel" +NormVector = "Norme" Sort = "Tri croissant" InvSort = "Tri décroissant" Maximum = "Maximum" diff --git a/apps/toolbox.it.i18n b/apps/toolbox.it.i18n index f913db44f..1790bed86 100644 --- a/apps/toolbox.it.i18n +++ b/apps/toolbox.it.i18n @@ -136,6 +136,10 @@ Trace = "Traccia" Dimension = "Dimensione" RowEchelonForm = "Matrice a scalini" ReducedRowEchelonForm = "Matrice ridotta a scalini" +Vectors = "Vettori" +Dot = "Prodotto scalare" +Cross = "Prodotto vettoriale" +NormVector = "Norma" Sort = "Ordine crescente" InvSort = "Ordine decrescente" Maximum = "Massimo" diff --git a/apps/toolbox.nl.i18n b/apps/toolbox.nl.i18n index 18e25d3cc..02be8f21b 100644 --- a/apps/toolbox.nl.i18n +++ b/apps/toolbox.nl.i18n @@ -136,6 +136,10 @@ Trace = "Spoor" Dimension = "Afmeting" RowEchelonForm = "Echelonvorm" ReducedRowEchelonForm = "Gereduceerde echelonvorm" +Vectors = "Vectoren" +Dot = "Inwendig product" +Cross = "Kruisproduct" +NormVector = "Norm" Sort = "Sorteer oplopend " InvSort = "Sort aflopend" Maximum = "Maximum" diff --git a/apps/toolbox.pt.i18n b/apps/toolbox.pt.i18n index 00790ad3d..54f95ee42 100644 --- a/apps/toolbox.pt.i18n +++ b/apps/toolbox.pt.i18n @@ -136,6 +136,10 @@ Trace = "Traço" Dimension = "Dimensão" RowEchelonForm = "Matriz escalonada" ReducedRowEchelonForm = "Matriz escalonada reduzida" +Vectors = "Vetores" +Dot = "Produto escalar" +Cross = "Produto vetorial" +NormVector = "Norma" Sort = "Ordem crescente" InvSort = "Ordem decrescente" Maximum = "Máximo"