From 7657df3326c01f072f27156da89b9a7547de3460 Mon Sep 17 00:00:00 2001 From: Emile Date: Tue, 5 Feb 2019 21:01:50 +0100 Subject: fixed some issues the linter threw such as exported function ne being commented --- quadtree.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit 1.4.1