Closed Bocian-1 closed 1 month ago
Fixed xor a^b
(everything was previously cast to a float, it now leaves ints as they are)
Additionally ive added:
Bitwise ops:
a|b
a&b
~a
Cast:
int(a)
- if you have a float but need to use a bitwise operator
Boolean ops (all return 1 or 0):
a and b
a or b
not a
Comparison ops (all return 1 or 0):
==
!=
>
>=
<
<=
Conditional:
iif(value, a, b)
- No lazy evaluation, if value is truthy a will be returned, else b
Hopefully that'll be of some use to you (assuming I didn't mess anything up 😅)
Even with just
1^1
I get this error: `Error occurred when executing MathExpression|pysssss:unsupported operand type(s) for ^: 'float' and 'float'`![image](https://github.com/pythongosssss/ComfyUI-Custom-Scripts/assets/70019596/931a7e61-303f-4ab5-9599-0a89a30bfbd3)
PS; I'd love to be able to use more logic functions in this node if possible, I've been able to simulate an
and
, but it's far from pretty