Elis
Permanent Fixture
- MBTI
- ENFJ
@sprinkles
This is my take on the switch. Compare the current level to the previous level. If it is raising, set the state to true. if it is sinking set the state to false.
I see what you're getting at, but I still think we're addressing different things here.
(current_level > previous_level) → (state)
This does not imply:
¬(current_level > previous_level) → ¬(state)
but (state) will still imply ¬(state)
On another note:
¬(state) will imply ¬(current_level > previous_level)
Code:
if current_level > previous_level:
state = true;
else if current_level < previous_level:
state = false;
This is my take on the switch. Compare the current level to the previous level. If it is raising, set the state to true. if it is sinking set the state to false.
I see what you're getting at, but I still think we're addressing different things here.
(current_level > previous_level) → (state)
This does not imply:
¬(current_level > previous_level) → ¬(state)
but (state) will still imply ¬(state)
On another note:
¬(state) will imply ¬(current_level > previous_level)