From ccab01a5eb3c53a91d7ae9c09c5542befee24fe0 Mon Sep 17 00:00:00 2001 From: leonelrosano <leonel.rosano@fing.edu.uy> Date: Thu, 14 Mar 2019 00:50:07 -0300 Subject: [PATCH] Soluciona error del /= y Naturales como primitivos --- .../plotter/graph2D/graph2D.component.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 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 cfb2cba8..bb8564dd 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 @@ -715,7 +715,7 @@ export class Graph2DComponent { if (exp.op == '==') { 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) + ')) == 0 || Math.abs((' + this.generarExpresion(exp.exp1) + ') - (' + this.generarExpresion(exp.exp2) + ')) == 0 '; + expresion = ' 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 { @@ -786,9 +786,9 @@ export class Graph2DComponent { } else if (grf.cod == 'Z') { dominio += "\"baseCod\": \"Z\", \"cod\": \"Z\" ,"; setf += "\"fcod\": \"Z\""; - } else if (grf.cod == 'N') { - dominio += "\"baseCod\": \"N\", \"cod\": \"N\" ,"; - setf += "\"fcod\": \"N\""; + // } else if (grf.cod == 'N') { + // dominio += "\"baseCod\": \"N\", \"cod\": \"N\" ,"; + // setf += "\"fcod\": \"N\""; } else { var nom = grf.cod; if (Array.isArray(grf.sets[0][nom])) { @@ -825,8 +825,8 @@ export class Graph2DComponent { domin += "\"radio\": 0.3, \"baseDom\": \"R\", \"dom\": \"Func\""; } else if (sets[0][nom].set == 'Z') { domin += "\"radio\": 2, \"baseDom\": \"Z\", \"dom\": \"Func\""; - } else if (sets[0][nom].set == 'N') { - domin += "\"radio\": 2, \"baseDom\": \"N\", \"dom\": \"Func\""; + // } else if (sets[0][nom].set == 'N') { + // domin += "\"radio\": 2, \"baseDom\": \"N\", \"dom\": \"Func\""; } else { var nombre = sets[0][nom].set; domin = this.recursivoDom(sets, nombre); @@ -841,8 +841,8 @@ export class Graph2DComponent { coodo += "\"baseCod\": \"R\", \"cod\": \"Func\","; } else if (sets[0][nom].set == 'Z') { coodo += "\"baseCod\": \"Z\", \"cod\": \"Func\","; - } else if (sets[0][nom].set == 'N') { - coodo += "\"baseCod\": \"N\", \"cod\": \"Func\","; + // } else if (sets[0][nom].set == 'N') { + // coodo += "\"baseCod\": \"N\", \"cod\": \"Func\","; } else { var nombre = sets[0][nom].set; coodo += this.recursivoDom(sets, nombre); @@ -858,7 +858,7 @@ export class Graph2DComponent { if (exp.op == '==') { expresion = ' Math.abs((' + this.generarF(exp.exp1) + ') - (' + this.generarF(exp.exp2) + ')) == 0 '; } else if (exp.op == '/=') { - expresion = ' Math.abs((' + this.generarF(exp.exp1) + ') - (' + this.generarF(exp.exp2) + ')) == 0 || Math.abs((' + this.generarF(exp.exp1) + ') - (' + this.generarF(exp.exp2) + ')) == 0 '; + expresion = ' Math.abs((' + this.generarF(exp.exp1) + ') - (' + this.generarF(exp.exp2) + ')) != 0'; } else if (exp.op == '^') { expresion = ' Math.pow(' + this.generarF(exp.exp1) + ',' + this.generarF(exp.exp2) + ') '; } else { -- GitLab