ProtoFlux:AND: Difference between revisions

From Resonite Wiki
Added ProtoFlux AND Node Page
 
Added an information note.
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#Invoke:ProtoFlux|GenerateUI
{{#Invoke:ProtoFlux|GenerateUI
|Name=AND
|Name=AND
|Category=Operators
|Category=Boolean
|Inputs=
|Inputs=
[
[
{"Name":"A", "Type":"bool"},
{"Name":"A", "Type":"Dummy"},
{"Name":"B", "Type":"bool"}
{"Name":"B", "Type":"Dummy"}
]
]
|Outputs=
|Outputs=
[
[
{"Name":"*", "Type":"bool"}
{"Name":"*", "Type":"Dummy"}
]
]
|}}
|}}


And is a ProtoFlux node that is a two input only version of [[ProtoFlux:MultiAND|MultiAND]].
The '''AND''' node takes in two value inputs (either a [[Type:bool|bool]] or a [[Value Type|number]] value), and functions as both a [https://en.wikipedia.org/wiki/Logical_conjunction logical AND] or [https://en.wikipedia.org/wiki/Bitwise_and#AND bitwise AND] depending on the type used.


== Inputs ==
If both inputs are true, then the result will be true.


=== A ([[Type:Bool|bool]]) ===
{{Note|This node's inputs default to true.|information}}


Boolean input for the first value
== Inputs ==


=== B ([[Type:Bool|bool]]) ===
=== A (Pseudo-generic) ===
The first input value.


Boolean input for the second value
=== B (Pseudo-generic) ===
The second input value.


== Outputs ==
== Outputs ==


=== * ([[Type:Bool|bool]]) ===
=== * (Pseudo-generic) ===


AND result of A ([[Type:Bool|bool]]) and B ([[Type:Bool|bool]]).
Returns the result of a logical AND of <code>A</code> and <code>B</code> if the node is a [[Type:bool|bool]] type, bitwise AND otherwise.


== Examples ==
== Examples ==


<gallery widths=480px heights=480px>
<gallery widths=480px heights=480px>
File:Protoflux_example_AND.webp|Example outputs of an AND node.
File:Protoflux_example_AND.jpg|Example outputs of an AND node.
</gallery>
</gallery>
== Further Reading ==
=== Videos ===
<youtube>bizj3dle8Qc</youtube>
== See Also ==
* Wikipedia's definition of [https://en.wikipedia.org/wiki/Logical_conjunction logical conjunction], [https://en.wikipedia.org/wiki/Bitwise_operation#AND bitwise and], & [https://en.wikipedia.org/wiki/AND_gate and gate].
* Microsoft's documentation on the [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/boolean-logical-operators and] operator.


[[Category:ProtoFlux:Operators:Boolean]]
[[Category:ProtoFlux:Operators:Boolean]]

Latest revision as of 17:09, 29 June 2024

AND
A
*
B
Boolean

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

If both inputs are true, then the result will be true.
This node's inputs default to true.

Inputs

A (Pseudo-generic)

The first input value.

B (Pseudo-generic)

The second input value.

Outputs

* (Pseudo-generic)

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

Examples

Further Reading

Videos

See Also