diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-09-17 14:55:39 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-09-17 14:55:39 +0200 |
commit | 666e49989b88dac36d4e6a5b1e7ac695011b0b36 (patch) | |
tree | cd39ad82b7d5bc29b44b6b255ff479ccaecd3cb3 /src/main.c | |
parent | 99cf1aea86c6a414604cf9eb06588f01bd8a30ef (diff) | |
download | AsciiMap-666e49989b88dac36d4e6a5b1e7ac695011b0b36.tar.gz |
added casting
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -59,8 +59,8 @@ int main(int argc, char *argv[]) unsigned int size_x,size_y; if(args.fit_width > 0) { - args.charsize_x = bitmap.x / args.fit_width; - args.charsize_y = (bitmap.y / bitmap.x) * args.charsize_x * 2; + args.charsize_x = (unsigned int)((float)bitmap.x / (float)args.fit_width); + args.charsize_y = (unsigned int)(((float)bitmap.y / (float)bitmap.x) * (float)args.charsize_x * 2); } /*size_x = args.fit_width; size_y = (unsigned int)(((float)size_x / (float)bitmap.x) * (float)bitmap.y);*/ |