Skip to content
0x6C77 edited this page Mar 20, 2013 · 3 revisions

Bounding box

Taken from java code here http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates

Example

2km bounding box around users location. Game area

2km bb

100m bounding box around unit. Target area

100m bb

Gotcha

radDist = 25 / 6371.0

Missing decimal on earths radius meant that int/int=int so rounded to 0 instead of 0.0000123. When adding decimal to radius int/float=float bingo sorted :)

Clone this wiki locally