Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

Getting The Radius Around Around A GPS

$
0
0
Say I have a GPS location at 0,0,0 and I want to work out the radius around it so that say I find any grids within 2000m of that point, how would I go about doing this?

I have the following code which checks all the axis to see if a ship is in range.
Code:
bool withinRadius=false;
if ((Convert.ToInt32(Math.Round(targets[i].coords.GetDim(0),0))
                    -Convert.ToInt32(Math.Round(center.GetDim(0),0)))<=radiusOffset){
                    //Echo ("inside x- ");...
Getting The Radius Around Around A GPS

Viewing all articles
Browse latest Browse all 903

Trending Articles