From 47d298d37141c6d062a302ba90a210655289f2c8 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Thu, 28 Feb 2019 10:57:16 +0100
Subject: [PATCH] Update #152

---
 .../formulaire/definition/form-compute-fixedvar.ts  | 13 ++-----------
 .../definition/form-compute-section-parametree.ts   |  6 ++----
 src/app/formulaire/definition/form-compute.ts       |  4 ++--
 3 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/src/app/formulaire/definition/form-compute-fixedvar.ts b/src/app/formulaire/definition/form-compute-fixedvar.ts
index 7b64ec15d..300703a6d 100644
--- a/src/app/formulaire/definition/form-compute-fixedvar.ts
+++ b/src/app/formulaire/definition/form-compute-fixedvar.ts
@@ -44,27 +44,18 @@ export class FormComputeFixedVar extends FormCompute {
 
     protected compute() {
         const nub: Nub = this._formBase.currentNub;
-        let computePrec: number;
-        if (this._formBase.hasParameter("Pr")) {
-            computePrec = this._formBase.getParameterValue("Pr"); // précision de calcul
-        }
-
         const computedParam: NgParameter = this.getComputedParameter();
-
         this.formResult.addFixedParameters();
-
         const varParam: NgParameter = this.getVariatedParameter();
 
         if (varParam === undefined) {
             // pas de paramètre à varier
-
-            const res: Result = this.runNubCalc(nub, computedParam, computePrec);
+            const res: Result = this.runNubCalc(nub, computedParam);
             this.formResult.fixedResults.result = res;
             this.formResult.fixedResults.calculatedParameter = computedParam;
         } else {
             // il y a un paramètre à varier
-
-            const res: Result = this.runNubCalc(nub, computedParam, computePrec);
+            const res: Result = this.runNubCalc(nub, computedParam);
 
             this.formResult.varResults.variatedParameter = varParam;
             this.formResult.varResults.calculatedParameter = computedParam;
diff --git a/src/app/formulaire/definition/form-compute-section-parametree.ts b/src/app/formulaire/definition/form-compute-section-parametree.ts
index 9640c2e47..1da49fa7e 100644
--- a/src/app/formulaire/definition/form-compute-section-parametree.ts
+++ b/src/app/formulaire/definition/form-compute-section-parametree.ts
@@ -33,7 +33,6 @@ export class FormComputeSectionParametree extends FormCompute {
      * @param varParam paramètre à varier
      */
     private doComputeSectionVar(varParam: NgParameter) {
-        const computePrec: number = this._formBase.getParameterValue("Pr"); // précision de calcul
 
         this._formSectionResult.addSectionFixedParameters(false);
 
@@ -50,7 +49,7 @@ export class FormComputeSectionParametree extends FormCompute {
         const computedParam: NgParameter = this.createParameter(computedParamInfo.symbol, this._formBase);
         this._varResults.calculatedParameter = computedParam;
 
-        this._varResults.result = this.runNubCalc(sectNub, computedParam, computePrec);
+        this._varResults.result = this.runNubCalc(sectNub, computedParam);
         this._varResults.graphTitle = computedParamInfo.symbol + " = f( " + varParam.symbol + " )";
         this._varResults.update(false);
     }
@@ -67,8 +66,7 @@ export class FormComputeSectionParametree extends FormCompute {
         const sect: acSection = sectNub.section;
         this._sectionResults.section = sect;
 
-        const computePrec: number = this._formBase.getParameterValue("Pr"); // précision de calcul
-        const tmpResult: Result = sectNub.CalcSerie(computePrec,
+        const tmpResult: Result = sectNub.CalcSerie(
             undefined, // valeur initiale, non utilisée dans ce cas
             undefined // variable à calculer, non utilisée
         );
diff --git a/src/app/formulaire/definition/form-compute.ts b/src/app/formulaire/definition/form-compute.ts
index 6d9b33ea2..4e8494753 100644
--- a/src/app/formulaire/definition/form-compute.ts
+++ b/src/app/formulaire/definition/form-compute.ts
@@ -25,7 +25,7 @@ export abstract class FormCompute {
     /**
      * lance le calcul d'un paramètre en déterminant une valeur initiale
      */
-    protected runNubCalc(nub: Nub, computedParam: NgParameter, prec: number): Result {
+    protected runNubCalc(nub: Nub, computedParam: NgParameter): Result {
         let init: number;
         switch (computedParam.domain.domain) {
             case ParamDomainValue.ANY:
@@ -69,7 +69,7 @@ export abstract class FormCompute {
                 break;
         }
 
-        return nub.CalcSerie(prec, init, this.getParameterRefid(computedParam));
+        return nub.CalcSerie(init, this.getParameterRefid(computedParam));
     }
 
     public doCompute() {
-- 
GitLab