Hi there,
as far as I know, void functions do not return values. However, when I run the code below,
the wind vector gets smaller and smaller with each frame, because the va value is returned back as new wind vector.
Why is that?
I would expect that wind stays the same all the time and just serves as input for the function.
PVector wind;
void setup(){
wind = new PVector(10,0);
}
void draw (){
println(wind);
apply(wind);
}
void apply(PVector wind_){
PVector va = wind_.sub(1,0);
}