Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matefun
Frontend
Commits
b000bc8e
Commit
b000bc8e
authored
Aug 19, 2018
by
jose.ignacio.fagian
Browse files
Renombramiento de variables duplicadas
parent
a5ed5208
Changes
1
Hide whitespace changes
Inline
Side-by-side
Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts
View file @
b000bc8e
...
...
@@ -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
elemento
1
=
this
.
recursionfuncion
(
jsonCanvas
.
funs
[
0
].
sets
,
nom
);
obj
.
conj
.
sets
.
fdom
=
function
(
x
)
{
return
eval
(
elemento
1
)
}
}
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
elemento
2
=
this
.
recursionfuncion
(
jsonCanvas
.
funs
[
0
].
sets
,
nom
);
obj
.
conj
.
sets
.
fcod
=
function
(
x
)
{
return
(
eval
(
elemento
2
))
}
}
//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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment