about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhanemile <hanemile@protonmail.com>2019-01-23 15:19:12 +0100
committerhanemile <hanemile@protonmail.com>2019-01-23 15:19:12 +0100
commit1edf4e33d33629cf29f9eaed47b7c2f6729dc7ca (patch)
treeec1531dfb385f8d4cf2ed410febf8f62cb5cc394
parent8eac5ec57d15f2b09f677c4d88df76cf1e03e337 (diff)
removed the recursion limit
-rw-r--r--quadtree.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/quadtree.go b/quadtree.go
index 8d74804..ca62afc 100644
--- a/quadtree.go
+++ b/quadtree.go
@@ -62,11 +62,6 @@ func (n *Node) Subdivide() {
 // Insert inserts the given star into the Node or the tree it is called on
 func (n *Node) Insert(star Star2D) error {
 
-	// prevent the function from recursing to deep into the tree
-	if n.Boundry.Width < 0.0000000000001 {
-		return fmt.Errorf("Could not insert star (%f, %f) (recursion limit reached)\n", star.C.X, star.C.Y)
-	}
-
 	// if the subtree does not contain a node, insert the star
 	if n.Star == (Star2D{}) {