Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Finding the Index of the lowest valued element in an array?

$
0
0
I'm sorry if this is a question that has been asked before, but after reading several explanations I am still struggling to understand, perhaps someone can offer a explanation of how this is done..

MyArray [10]

MyArray [0] = 1position.z
MyArray [1] = 2position.z
MyArray [2] = 3position.z... Etc...

I am able to calculate the lowest value, but I need to know 'what' index it is, be it [4] , [7] or whatever it may be!

Many thanks if you take the time to help

Peace

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>