How to check for two conditions and output according to state of either?

Ploki's icon

I need something like this:
a + a = a
b + b = b
a + b = c
b + a = c

So the position doesn't matter. I'm kinda lost

edit: I am aware of [if] and multiple conditions, but you need to specify for each input, i want it input-independent. just checks both and outputs if the combination is right.

I'd use "+" but I'm using Symbols. The stupidest way would be a dictionary in coll and an object that converts symbols to numbers.

Roman Thilenius's icon

for symbols both, the comparison operators and [if], are out of question.
you can compare (here: check for equality) symbols using [zl union] and [zl sect] relatively easy.

to "add" 2 conditions you would just add the 2 results (0 or 1 for each comparison) and
check for 0 or non 0.

example:

[> ] [> ]
|      |
[if ($i1+$i2) then 1 else 0]

AudioMatt's icon
Max Patch
Copy patch and select New From Clipboard in Max.

how bout this?

Ploki's icon

unfortunately this isn't any more simple than my solution.
I might as well be specific and post a patcher, I'll open a new topic because the patcher has other problems as well