Good evening all, please somebody help me with this issue.
I have an array as shown in the code below. I am interested in the third (X), and fourth (Y) column. I would like to write a loop to subtract the current value from the next value. Something like this: d = x(i+1) - xi; a = y(i+1) - yi;
struct LatLon
{
double Lat;
double Lon;
double X;
double Y;
};
static const LatLon LatLonList[] =
{
{6.86899, 7.41179, 0, 0},
{6.86898102641852, 7.41178940176106, 1.5, 2},
{6.86897205283705, 7.41178880352213, 2.5, 3},
{6.86896307925557, 7.41178820528321, 4, 5},
{6.86895410567409, 7.4117876070443, 6, 7},
{6.86894513209261, 7.4117870088054, 8, 9},
{6.86893615851114, 7.41178641056651, 10, 11},
{6.86892718492966, 7.41178581232764, 12, 13},
{6.86891821134818, 7.41178521408877, 20, 21},
{6.86890923776671, 7.41178461584992, 32, 34},
};