From 46d9ef8ed5fbfc2cf11e45d82ec05d19e2b787a0 Mon Sep 17 00:00:00 2001 From: leonmavr <0xleo.git@gmail.com> Date: Mon, 16 Sep 2024 16:51:46 +0200 Subject: [PATCH] Use interface functions in test --- test/test.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/test/test.c b/test/test.c index cabaca9..c9502b1 100644 --- a/test/test.c +++ b/test/test.c @@ -13,28 +13,10 @@ int main(int argc, char** argv) { rect_t boundary = {0, 0, 400, 200}; point_t points[10] = {{51, 25}, {20, 49}, {199, 62}, {160, 70}, {160, 80}, {110, 90}, {108, 120}, {180, 143}, {0, 149}, {330, 190}}; - /* - * - * +--------+--------+----------------+ - * | - * | - * | - * | - * | - * | - * | - * | - * | - * | - * | - * | - * +--------+--------+----------------+ - * - */ quadtree_t qtree; - qtree.root = node_new(&boundary); + qtree_new(&qtree, &boundary); for (int i = 0; i < sizeof(points)/sizeof(points[0]); ++i) - node_insert(qtree.root, &points[i]); + qtree_insert(&qtree, &points[i]); //------------------------------------------------------------------------- // Inspect insertion //-------------------------------------------------------------------------