From b000bc8edd00aa4afec3aab8154fffa1c2c747e3 Mon Sep 17 00:00:00 2001 From: "jose.ignacio.fagian" <nachofagian@gmail.com> Date: Sun, 19 Aug 2018 18:00:55 -0300 Subject: [PATCH] Renombramiento de variables duplicadas --- .../layout/plotter/graph2D/graph2D.component.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts index 066b694d..d0230c08 100755 --- a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts +++ b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts @@ -41,13 +41,13 @@ export class Graph2DComponent { //Para las funciones if (obj.conj.sets.fdom == "function(x)") { var nom = jsonCanvas.funs[0].dom; - var elemento = this.recursionfuncion(jsonCanvas.funs[0].sets, nom); - obj.conj.sets.fdom = function (x) { return eval(elemento) } + var elemento1 = this.recursionfuncion(jsonCanvas.funs[0].sets, nom); + obj.conj.sets.fdom = function (x) { return eval(elemento1) } } if (obj.conj.sets.fcod == "function(x)") { var nom = jsonCanvas.funs[0].cod; - var elemento = this.recursionfuncion(jsonCanvas.funs[0].sets, nom); - obj.conj.sets.fcod = function (x) { return (eval(elemento)) } + var elemento2 = this.recursionfuncion(jsonCanvas.funs[0].sets, nom); + obj.conj.sets.fcod = function (x) { return (eval(elemento2)) } } //para Enumerados if (obj.conj.dom == 'Numer') { @@ -453,7 +453,7 @@ export class Graph2DComponent { grafica = fun; } } - funcionString = '(' + grafica.args.join() + ',delta,hayPunto)=>{\n' + funcionString + '}'; + funcionString = '(' + grafica.args.join() + ')=>{\n' + funcionString + '}'; return funcionString; } @@ -464,9 +464,9 @@ export class Graph2DComponent { expresion = ' (' + this.generarExpresion(exp.cond) + '?' + this.generarExpresion(exp.exp1) + ':' + this.generarExpresion(exp.exp2) + ') '; } else if (exp.kind == 'bop') { if (exp.op == '==') { - expresion = ' Math.abs((' + this.generarExpresion(exp.exp1) + ') - (' + this.generarExpresion(exp.exp2) + ')) < delta && hayPunto() '; + expresion = ' Math.abs((' + this.generarExpresion(exp.exp1) + ') - (' + this.generarExpresion(exp.exp2) + ')) == 0 '; } else if (exp.op == '/=') { - expresion = ' Math.abs((' + this.generarExpresion(exp.exp1) + ') - (' + this.generarExpresion(exp.exp2) + ')) > delta || Math.abs((' + this.generarExpresion(exp.exp1) + ') - (' + this.generarExpresion(exp.exp2) + ')) < delta && !hayPunto() '; + expresion = ' Math.abs((' + this.generarExpresion(exp.exp1) + ') - (' + this.generarExpresion(exp.exp2) + ')) == 0 || Math.abs((' + this.generarExpresion(exp.exp1) + ') - (' + this.generarExpresion(exp.exp2) + ')) == 0 '; } else if (exp.op == '^') { expresion = ' Math.pow(' + this.generarExpresion(exp.exp1) + ',' + this.generarExpresion(exp.exp2) + ') '; } else { -- GitLab