beta
cables is under heavy development.
There might be one or another bug, please let us know about it!

BoolStateArray Op



BoolStateArray
Namespace: Ops.Array

Op author: tim

Array filled with `0`, only one can be `1`


Outputs an array where only one element is 1, the other elements are 0. By changing the Active Index port you can decide which of the elements is the 1.

E.g.:
Active Index is 2: [0, 0, 1, 0, 0, 0, 0, 0, 0, 0]

you can also set the inactive value and active value to change the 0 and 1 to something else like 9.5 and 0.1



Inputs

Array Length (Number)

How long the array should be

Active Index (Number)

Which element is the 1

Inactive Value (Number)

Zeroes are set to this number

Active Value (Number)

Ones are set to this number

Outputs

State Array (Array)

The array containing elements with 0, and one element with 1


Caught a mistake or want to contribute to the documentation?

Edit Documentation 

BoolStateArray example


Patches using BoolStateArray

  • Examples
  • Public
  • My Patches

Changelog


Ops.Array.ExclusiveBoolStateArray renamed to Ops.Array.BoolStateArray
2019-06-13 - pandur