diff options
author | pommicket <leonardomtenenbaum@gmail.com> | 2016-06-19 12:48:45 -0400 |
---|---|---|
committer | pommicket <leonardomtenenbaum@gmail.com> | 2016-06-19 12:48:45 -0400 |
commit | ce071a9d599b53c3678e705feb68644bdc8a211d (patch) | |
tree | 3fc1f0154c3dc3d7b46b0d012838fd4d20106c08 /AutoImages/src/main.c | |
parent | f30243385b6eaebaf143bf4d98a0b14d6ed02e78 (diff) |
Fixed AutoImages problem
Diffstat (limited to 'AutoImages/src/main.c')
-rw-r--r-- | AutoImages/src/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/AutoImages/src/main.c b/AutoImages/src/main.c index f4212c2..5ec4cf6 100644 --- a/AutoImages/src/main.c +++ b/AutoImages/src/main.c @@ -14,7 +14,7 @@ #include "Random.h" -#define FUNCTION_LENGTH 40 +#define FUNCTION_LENGTH 20 @@ -133,9 +133,9 @@ matrix* evalFunction(char* function, int width, int height) } if (strEquals(token, "x")) - push(stack, x); + push(stack, cpy_matrix(x)); else if (strEquals(token, "y")) - push(stack, y); + push(stack, cpy_matrix(y)); else if (strEquals(token, "sin")) push(stack, sin_matrix(pop(stack))); else if (strEquals(token, "cos")) @@ -211,7 +211,9 @@ matrix* evalFunction(char* function, int width, int height) token = strtok(NULL, " "); } - + + printf("This should be 77: %d\n", x->array[77][21]); + printf("This should be 27: %d\n", y->array[77][27]); return pop(stack); } |