Hello Everyone,
Im very new to programming and came along following problem while programming with Processing 3.5.3 in Android Mode for a Smartphone App.
Im using the command touches.length in the void touchEnded() function and get results, i dont understand.
My problem: if i have four touches and release one, the touches.length should return 3 (i think) but it still returns 4.
Here is a simple code:
void setup(){
background(120);
}void draw(){
}void touchStarted(){
println("Start: " + touches.length);
}void touchEnded(){
println("End: " + touches.length);
}
With this Code i get following output: (do four touches, then release the touches again, step by step)
Start 1
Start 2
Start 3
Start 4
End 4
End 3
End 2
End 0
This is what i would expect from the code:
Start 1
Start 2
Start 3
Start 4
End 3
End 2
End 1
End 0
Do you get the same Ouput as I do?
What output to u get and why is my expected output wrong?
Thank you for you response!