From 04c4c5bc56c9f7d1c3282a6310fbd608770f5d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Thu, 4 Aug 2022 20:33:32 -0300 Subject: Change dataset --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4394abe..5da8118 100644 --- a/main.c +++ b/main.c @@ -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); -- cgit v1.2.3