Difference between revisions of "Boolean Counter (LogiX node)"
Jump to navigation
Jump to search
(Marked this version for translation) |
|||
Line 16: | Line 16: | ||
This node takes any number of boolean inputs and outputs three integers. | This node takes any number of boolean inputs and outputs three integers. | ||
+ | <!--T:5--> | ||
The first output is how many <code>true</code> values are used as input. The second output is how many <code>false</code> values are used as input. The third output is how many total inputs there are. | The first output is how many <code>true</code> values are used as input. The second output is how many <code>false</code> values are used as input. The third output is how many total inputs there are. | ||
Line 21: | Line 22: | ||
The following image showcases the four inputs <code>false</code> <code>true</code>, <code>false</code>, and <code>false</code> outputting the three integers <code>1</code>, <code>3</code>, and <code>4</code>. | The following image showcases the four inputs <code>false</code> <code>true</code>, <code>false</code>, and <code>false</code> outputting the three integers <code>1</code>, <code>3</code>, and <code>4</code>. | ||
+ | <!--T:6--> | ||
[[File:Logix Example BooleanCounter.png|400px]] | [[File:Logix Example BooleanCounter.png|400px]] | ||
Latest revision as of 04:13, 12 June 2023
Boolean Counter | ||
---|---|---|
Inputs | ||
Bool | [0] | |
Bool | [1] | |
Outputs | ||
Int | TrueCount | |
Int | FalseCount | |
Int | TotalCount |
The Boolean Counter node counts the number of true/false values among the input boolean values, as well as the total number of boolean values itself.
Usage
This node takes any number of boolean inputs and outputs three integers.
The first output is how many true
values are used as input. The second output is how many false
values are used as input. The third output is how many total inputs there are.
Examples
The following image showcases the four inputs false
true
, false
, and false
outputting the three integers 1
, 3
, and 4
.