Assume I have 3 arrays : int[] array1 = new int{0,0,0}
int[] array2 = new int{0,0,0}
double[] array3 = new double{0,0,0}
I want to do a simple operation, something like "array3=array1/array2"
When I use the following snippet :
for (i=0;i<array1.length;i++) {array3[i]=array1[i]/array2[i];}
...It always returns 0 values. My best guess is that I must convert array1/array2 into a double before assigning it to array3 but I am not sure of that.
Using the "AssignTo" method might be more straightforward but I am not very familiar with it. Could you give me the best method to do these kind of operations with different types of arrays ?
Comment