about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-02-05 21:01:50 +0100
committerEmile <hanemile@protonmail.com>2019-02-05 21:01:50 +0100
commit7657df3326c01f072f27156da89b9a7547de3460 (patch)
tree097d296ec0d3e046dc16c73cf85def0038d359c9
parent3f3567b15289065431273b844cd2001d72754571 (diff)
fixed some issues the linter threw such as exported function ne being commented
-rw-r--r--quadtree.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/quadtree.go b/quadtree.go
index f83f739..b375605 100644
--- a/quadtree.go
+++ b/quadtree.go
@@ -10,6 +10,7 @@ import (
 	"sync"
 )
 
+// Node defines a node in the tree storing the galaxy
 type Node struct {
 	Boundary     BoundingBox // Spatial outreach of the quadtree
 	CenterOfMass Vec2        // Center of mass of the cell
@@ -38,7 +39,7 @@ func NewRoot(BoundingBoxWidth float64) *Node {
 	}
 }
 
-// Create a new new node using the given bounding box
+// NewNode creates a new new node using the given bounding box
 func NewNode(bounadry BoundingBox) *Node {
 	return &Node{Boundary: bounadry}
 }
@@ -240,6 +241,7 @@ func (n *Node) calcCenterOfMass() Vec2 {
 	return n.CenterOfMass
 }
 
+// CalcCenterOfMass calculates the center of mass for every node in the tree
 func (n *Node) CalcCenterOfMass() Vec2 {
 	tree := n.GenForestTree(n)
 	fmt.Println(tree)