Math docs, add spacing to binstr_to_int

This commit is contained in:
2023-07-12 11:45:30 -07:00
parent a029765cf4
commit db44dc5a31
11 changed files with 79 additions and 12 deletions

View File

@ -161,10 +161,14 @@ void test_math() {
printf("Between %d and %d, %d is larger\n", i, j, max_int(i, j));
printf("Between %d and %d, %d is smaller\n", i, j, min_int(i, j));
char *s = "1010110";
char *s = "10101101";
printf("Binary: %s\n", s);
printf("Decimal: %d\n", binstr_to_int(s));
char *s2 = "1010_1101";
printf("Binary: %s\n", s2);
printf("Decimal: %d\n", binstr_to_int(s2));
printf("\nGenerate line from 0,0 to 2,5\n");
size_t sz = 0;
Point *line = bresenham(0, 0, 2, 5, &sz);