diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-08-04 20:33:32 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-08-04 20:33:32 -0300 |
commit | 04c4c5bc56c9f7d1c3282a6310fbd608770f5d42 (patch) | |
tree | 7f6983b57e1c055c75e2ba5a1a2f5975b4c757d0 /main.c | |
parent | b79a4d1e41f273945ebac8c620702e73ad63cb51 (diff) | |
download | sort-04c4c5bc56c9f7d1c3282a6310fbd608770f5d42.tar.gz sort-04c4c5bc56c9f7d1c3282a6310fbd608770f5d42.zip |
Change dataset
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -12,7 +12,7 @@ #define DST_FONT_WIDTH 28 #define DST_FONT_HEIGHT 32 #define ATLAS_WIDTH 18 -#define DATASET_SIZE 100 +#define DATASET_SIZE 800 #define STATS_SIZE 80 int main(int argc, char **argv) { @@ -55,6 +55,7 @@ int main(int argc, char **argv) { } } + for (int i = 0; i < 10; i++) { if (sort_index < DATASET_SIZE - 1) { if (sort_index_internal >= 0 && to_be_sorted[sort_index_internal] > to_be_sorted[sort_index_internal + 1]) { @@ -70,6 +71,7 @@ int main(int argc, char **argv) { comparisons++; } } + } SDL_SetRenderDrawColor(ren, 0, 0, 0, 255); SDL_RenderClear(ren); @@ -105,7 +107,7 @@ int main(int argc, char **argv) { i * WINDOW_WIDTH / DATASET_SIZE, WINDOW_HEIGHT, WINDOW_WIDTH / DATASET_SIZE, - -to_be_sorted[i] * (int) (WINDOW_HEIGHT * 0.8) / DATASET_SIZE + -to_be_sorted[i] * (int) (0.8 * WINDOW_HEIGHT) / DATASET_SIZE }; if (sort_index_internal == i - 1) { SDL_SetRenderDrawColor(ren, 0, 255, 0, 255); |