output bang only when crossing specific number from low to high or from high to low

R_Gol's icon

I have input numbers between 0. and 1.

I want to output bang only when I'm crossing x point (lets say 0.5) from low number to high number

and also to have the ability to do the other way around

How can I do so?

TFL's icon

[> 0.5] connected to [togedge]