toggle

fun toggle(button: Boolean)

Changes the state of the boolean if it hasn't been changed in the previous cycle