aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/common.h b/common.h
index 2e8b8bc..80f807c 100644
--- a/common.h
+++ b/common.h
@@ -159,4 +159,25 @@ intolerant_eq(double a, double b)
}\
} while (0)
+# if 0
+static void
+print_raster(const RASTER *r) {
+ size_t y, x;
+ fprintf(stderr, "\nOutline (area)\n");
+ for (y = 0; y < r->height; y++) {
+ for (x = 0; x < r->width; x++)
+ fprintf(stderr, r->cells[y * r->width + x].cell_coverage ? "%+.4lf " : " 0 ",
+ r->cells[y * r->width + x].cell_coverage);
+ printf("\n");
+ }
+ fprintf(stderr, "\nOutline (shadow)\n");
+ for (y = 0; y < r->height; y++) {
+ for (x = 0; x < r->width; x++)
+ fprintf(stderr, r->cells[y * r->width + x].opposite_coverage ? "%+.4lf " : " 0 ",
+ r->cells[y * r->width + x].opposite_coverage);
+ printf("\n");
+ }
+}
+# endif
+
#endif