Skip to content
Snippets Groups Projects
Commit 0cb6281d authored by jose.ignacio.fagian's avatar jose.ignacio.fagian
Browse files

Cambios de nomenclatura sen por sin y round. Arreglo de grafica de reales.

parent b496eed1
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,12 @@ export class Graph2DComponent {
var num = this.getRandomArbitrary(0,4);
var color = colores[num];
var tipoGraf;
if (obj.conj.baseDom != 'R'){
tipoGraf = 'scatter';
}else{
tipoGraf = 'polyline';
}
functionPlot({
target: '#graph2D-container',
width: 620,
......@@ -70,7 +76,7 @@ export class Graph2DComponent {
fn: function(scope) {
return fun(scope.x)
},
graphType: 'scatter',
graphType: tipoGraf,
color: color
}]
})
......@@ -120,9 +126,9 @@ export class Graph2DComponent {
} else if (exp.kind == 'app') {
if (exp.fun == 'cos') {
exp.fun = 'Math.cos'
} else if (exp.fun == 'sen') {
} else if (exp.fun == 'sin') {
exp.fun = 'Math.sin'
} else if (exp.fun == 'red') {
} else if (exp.fun == 'round') {
exp.fun = 'Math.round'
}
expresion = ' ' + exp.fun + '(' + exp.args.map(e => this.generarExpresion(e)).join() + ') ';
......@@ -261,7 +267,7 @@ export class Graph2DComponent {
} else if (exp.kind == 'app') {
if (exp.fun == 'cos') {
exp.fun = 'Math.cos'
} else if (exp.fun == 'sen') {
} else if (exp.fun == 'sin') {
exp.fun = 'Math.sin'
} else if (exp.fun == 'round') {
exp.fun = 'Math.round'
......
......@@ -27,7 +27,6 @@ export class Graph3DComponent {
speed: 1000
};
constructor(ghciService: GHCIService, private zone: NgZone) {
this.ghciServiceSub = ghciService.messages.subscribe(
message => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment