From 5c0b36a419eccc4bc87f26942243f1dbe12f9760 Mon Sep 17 00:00:00 2001 From: tovjemam Date: Tue, 12 Nov 2024 11:38:26 +0100 Subject: [PATCH] odstraneni komentaru --- main.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/main.c b/main.c index 0338011..164963b 100644 --- a/main.c +++ b/main.c @@ -14,41 +14,21 @@ int main(int argc, char *argv[]) { return 1; } - /* - //struct lexer *lex = lex_create("x* sin (x ^ 2) * 5.5e+2* cosh (x )"); - //struct lexer *lex = lex_create("-1 + -2 - 3 + 4"); - */ lex = lex_create(argv[1]); node = parse_expression(lex); lex_free(lex); - //if (node) { - // double x; - // node_debug_print(node); - // printf("polygon("); - // for (x = -10.0; x < 10.0; x += 0.1) { - // printf("(%.2f,%.2f),", x, node_eval(node, x)); - // } - // printf("(10, -1000),(-10,-1000))\n"); - //} - if (node) { FILE *file; struct graph_range graph; - //graph.xmin = -10.0; - //graph.xmax = 10.0; - //graph.ymin = -10.0; - //graph.ymax = 10.0; - //graph.step = 0.1; - graph.xmin = -3.14; - graph.xmax = 3.14; - graph.ymin = -1; - graph.ymax = 1; + graph.xmin = -20.0; + graph.xmax = 20.0; + graph.ymin = -20.0; + graph.ymax = 20.0; graph.step = 0.01; - file = fopen("out.ps", "w"); ps_export_graph(file, node, &graph); fclose(file);