From 6d8b481889d63a2dd3fff4ec22bc01e713086333 Mon Sep 17 00:00:00 2001 From: hanemile Date: Sat, 3 Nov 2018 18:05:58 +0100 Subject: Updated the Example text. --- structs_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/structs_test.go b/structs_test.go index ae4ed35..fe41cae 100644 --- a/structs_test.go +++ b/structs_test.go @@ -127,19 +127,20 @@ func TestInsert(t *testing.T) { t.Logf("Complete Tree: %v\n", newQuadtree.northEast.southWest.southWest.northEast) } -// Example demonstrating the NewCoord() function +// The NewCoord function can be used to create a new Coordinate in the following way: func ExampleNewCoord() { fmt.Println(NewCoord(1, 1)) // Output: {1, 1} } -// Example demonstrationg the NewBoundingBox() function +// The NewBoundingBox function can combine a coordinate resulting in a BoundingBox: func ExampleNewBoundingBox() { fmt.Println(NewBoundingBox(NewCoord(0, 0), 10)) // Output: {{0, 0}, 10} } -// Example using the InsideOf() method to test if a point is inside of a quadtre-cell +// Using the InsideOf() function, it can be determined if a point is inside of a bounding box +// or not. The Example below can be used as a reference: func ExampleInsideOf() { var point Coord = NewCoord(0, 0) var bounadry BoundingBox = NewBoundingBox(NewCoord(0, 0), 10) -- cgit 1.4.1