Answers for "I can't average vectors"
http://answers.unity.com/questions/1633114/i-cant-average-vectors.html
The latest answers for the question "I can't average vectors"Answer by Bunny83
http://answers.unity.com/answers/1633139/view.html
It looks like you messed up your jagged array indices. You just added up the "i" and "j" index which gives you pretty much nonsense. For example i==0 and j==1 will give you the same result as i==1 and j==0. You probably wanted to multiply one of the variables [with a stride factor][1].
<br>
I would generally recommend to calculate the stride once and store it in a variable. Currently it seems you calculate it all the time on the fly at various places.
[1]: https://en.wikipedia.org/wiki/Stride_of_an_array#Example_of_multidimensional_array_with_non-unit_strideMon, 20 May 2019 03:44:12 GMTBunny83