diff options
author | sanine <sanine.not@pm.me> | 2022-01-26 00:41:47 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-01-26 00:41:47 -0600 |
commit | c5fae17327c585ec09ad01066e3f24a4e7be1fed (patch) | |
tree | 3d43dc6e9d4b7361616c0c8e3aeba01de5c88830 /experimental/tectonics/tectonics.h | |
parent | 3c0ee746d9d2822c1bf04e76267c14785b4d54df (diff) |
fix bug in getting closest point
Diffstat (limited to 'experimental/tectonics/tectonics.h')
-rw-r--r-- | experimental/tectonics/tectonics.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/experimental/tectonics/tectonics.h b/experimental/tectonics/tectonics.h index 85b86fe..b2793e9 100644 --- a/experimental/tectonics/tectonics.h +++ b/experimental/tectonics/tectonics.h @@ -46,6 +46,7 @@ void subdivide(struct quadtree_node_t *node, struct point_t *points); bool insert(struct quadtree_node_t *node, struct point_t *points, int id); int get_closest(struct quadtree_node_t *root, + struct point_t *points, struct point_t pt); void draw_quadtree(cairo_t *cr, struct quadtree_node_t *root); void free_tree(struct quadtree_node_t *root); @@ -59,7 +60,7 @@ void free_tree(struct quadtree_node_t *root); void get_cairo_size(cairo_t *cr, int *width, int *height); double rand01(); -double distance(double x0, double y0, double x1, double y1); +double distance(struct point_t p1, struct point_t p2); /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |