diff options
author | hanemile <hanemile@protonmail.com> | 2018-10-30 15:22:57 +0100 |
---|---|---|
committer | hanemile <hanemile@protonmail.com> | 2018-10-30 15:22:57 +0100 |
commit | 74ca6c5f87b7ca29231c3666f8bc49296559b473 (patch) | |
tree | 05be30e525aad433d0073a9a3ed81e4ca9215ac0 /structs | |
parent | b12c570a8f9217d105a32acd439249cd307d44b0 (diff) |
Bounding box adds a structure that information about a single cell in
the quadtree. (Also added some comments)
Diffstat (limited to 'structs')
-rw-r--r-- | structs/structs.go | 12 |
1 files changed, 12 insertions, 0 deletions
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 +} |