If statement+counter not working with if(val == 1)
Hello,
as for title, I am trying to get a if statement work when counter reaches a specific value, but it is not happening.
What am I missing? Is it the reason the pulse and flag happens only when origin/end is passed?
int/float?
I am working in gen~
You can't rely on floating-point numbers being accurate, this is true for all programming languages. count will probably never be exactly equal to 1. Try using if(count >=1) instead.
Ah, maybe I get what you meant Roman.
I tried with integers under suggestion of a user in facebook group. It works.
Yes, also avoiding floating-points works.
Hi Dimitri,
sorry I missed your answer before writing. Yeah, I wanted to avoid the >= for specific reasons (I am triggering events at reset, thus I want it to be precise).