ProtoFlux:XOR: Difference between revisions

From Resonite Wiki
Created a page for the XOR node.
 
Added an information note.
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
  - If both inputs are different, then the result will be true.
  - If both inputs are different, then the result will be true.
  - If both inputs are the same, then the result will be false.
  - If both inputs are the same, then the result will be false.
{{Note|The above ruleset breaks when using the [[ProtoFlux:MultiXOR|MultiXOR]] node, where the resulting output actually alternates when adding more input values. This may be due to how these nodes/code stacks it's operation when calculating the output.|warning}}
{{Note|This node is similar to the [[ProtoFlux:Xor Elements|Xor Elements]] node.|information}}


== Inputs ==
== Inputs ==

Latest revision as of 18:18, 29 June 2024

XOR
A
*
B
Boolean

The XOR node takes in two value inputs (either a bool or a number value), and functions as both a logical xor or bitwise XOR depending on the type used.

- If both inputs are different, then the result will be true.
- If both inputs are the same, then the result will be false.
The above ruleset breaks when using the MultiXOR node, where the resulting output actually alternates when adding more input values. This may be due to how these nodes/code stacks it's operation when calculating the output.
This node is similar to the Xor Elements node.

Inputs

A (Pseudo-generic)

The first input value.

B (Pseudo-generic)

The second input value.

Outputs

* (Pseudo-generic)

Returns the result of a logical XOR of A and B if the node is a bool type, bitwise XOR otherwise.

Further Reading

Videos

See Also