I have 4 numbers 0-3 which is an enum (objective-c) and I'd like to get the opposite using a formula. So if 0 is put into the formula it returns 2 and if it 2 is entered then it returns 0 (and same with 1 and 3).
The reason being (and it is programming related) that I want to get the opposite of an enum without having to do an if or switch statement. But this means that any formula (if it is possible must uncomplex, so that it is more efficient than using if or switch.