I want to get two indexes of the array, and subtract that value.
For example, I want to enter index [0, 1]
and [2, 10]
. And here I want to subtract the value, to calculate the distance between these points.
for (int i = 0; i < 1; i++)
{
for (int j = 0; j < 1; j++)
{
matriz = matriz1[i, j] - matriz2[i, j];
}
}
I did this, but it returns zero. Returns zero because it assumes the value for the indexes, not their position.
How can I do this?
I need to get to the value that represents how many indices when I'm in [0, 1]
I'll be [2, 10]