Home How to store an array index location as an integer variable in Processing
Reply: 1

How to store an array index location as an integer variable in Processing

the_bonze
1#
the_bonze Published in 2018-01-06 16:17:53Z

I have an array of fifty float values, at array index locations 0-49.

I know that the lowest value in that array is 5,278,015, at index location 19 (i.e., it is the 20th value in that array).

Is there a way in which I can extract the index location (19) and store it in a variable as an integer?

I am using Processing 3.0.

Or251
2#
Or251 Reply to 2018-01-06 22:21:44Z

I'll post the answer i gave at the comments because @Kevin Workman asked for it.

just loop over the array and save the index where min(array) equals array[i].

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30361 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO