Hi all,
So I’ve been given an assignment to produce a function that gets the lowest value of an array, then stores that value and uses it to color a circle, and write that same value onto that circle.
I cannot get my function to work. It seems to do nothing, commenting it out makes no impact whatsoever.
I am basically losing the will to live here as the person giving my class this assignment hasn’t given us any outlines of syntax and I am clearly ordering things or calling things wrong here.
If you can help, I would HUGELY appreciate it.
int a[]= new int [50];
int MIN= 0;
void setup()
{
size(450,450);
for(int i=0; i < a.length; i++)
{
a[i] = (int) random (60,255);
print(a[i]+" , ");
println("MIN+",MIN);
}
}
void draw(){
fill (MIN);
textSize(width/4);
ellipse(width/2,height/2,width/2,height/2);
fill (240);
textSize(width/4);
text(MIN, width*.32 ,height*.58);
getMIN(8);
}
void getMIN(int MIN){
for(int i=0;i<a.length; i++)
{
if(a[i]< MIN){
MIN=(a[i]);
}
}
}