about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--structs.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/structs.go b/structs.go
index 68ccea3..38ed84c 100644
--- a/structs.go
+++ b/structs.go
@@ -151,3 +151,19 @@ func (quadtree *quadtree) Insert(point Coord) {
 	// Insert the point into the slice
 	quadtree.pointsSlice = append(quadtree.pointsSlice, point)
 }
+
+func (quadtree *quadtree) Print() {
+	if quadtree.northEast != nil {
+		quadtree.northEast.Print()
+	}
+	if quadtree.northWest != nil {
+		quadtree.northWest.Print()
+	}
+	if quadtree.southEast != nil {
+		quadtree.southEast.Print()
+	}
+	if quadtree.southWest != nil {
+		quadtree.southWest.Print()
+	}
+	print(quadtree.pointsSlice)
+}