about summary refs log tree commit diff
path: root/structs.go
diff options
context:
space:
mode:
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go20
1 files changed, 6 insertions, 14 deletions
diff --git a/structs.go b/structs.go
index 38ed84c..2d7f6a9 100644
--- a/structs.go
+++ b/structs.go
@@ -6,6 +6,12 @@ type Coord struct {
 	y float64
 }
 
+// BoundingBox defines a single cell in the quadtree
+type BoundingBox struct {
+	center        Coord
+	halfDimension float64
+}
+
 // newCoord returns a new coordinate using the given values
 func NewCoord(x float64, y float64) Coord {
 	return Coord{x, y}
@@ -33,20 +39,6 @@ func (point Coord) insideOf(quadtreeCell *quadtree) bool {
 	return false
 }
 
-// BoundingBox defines a single cell in the quadtree
-type BoundingBox struct {
-	center        Coord
-	halfDimension float64
-}
-
-// NewBoundingBox returns a new bounding with the given struct elements
-func NewBoundingBox(inCenter Coord, inHalfDimension float64) BoundingBox {
-	return BoundingBox{
-		center:        inCenter,
-		halfDimension: inHalfDimension,
-	}
-}
-
 // quadtree defining the whole quadtree and a node in itself (recursively)
 type quadtree struct {
 	// general information (node capacity, spacial outreach)