From 74ca6c5f87b7ca29231c3666f8bc49296559b473 Mon Sep 17 00:00:00 2001 From: hanemile Date: Tue, 30 Oct 2018 15:22:57 +0100 Subject: Bounding box adds a structure that information about a single cell in the quadtree. (Also added some comments) --- structs/structs.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/structs/structs.go b/structs/structs.go index ad47731..6f1dd57 100644 --- a/structs/structs.go +++ b/structs/structs.go @@ -1,6 +1,18 @@ package structs +// coordinate type storing a position type coord struct { x float64 y float64 } + +// newCoord returns a new coordinate using the given values +func newCoord(x float64, y float64) coord { + return coord{x, y} +} + +// boundingBox defines a single cell in the quadtree +type boundingBox struct { + center coord + halfDimension float64 +} -- cgit 1.4.1