if there are only 4 possible data sets to work with, why do you need an equation?
Some good ol boolean algebra should do the trick
I guess there are 8. I didn't mention it because I don't think you need it to make the formula.
(1,-1,45), (-1,-1,225), (-1,1,-45), (1,1,-135)
I think those are them. Getting those values was incredibly confusing for some reason.
Alright I got it figured out. Thanks anyway.