ProtoFlux:Zero One: Difference between revisions

From Resonite Wiki
cleanup
 
(6 intermediate revisions by 3 users not shown)
Line 11: Line 11:
]
]
|}}
|}}
'''0/1''' Converts a [[bool]] value into a 0 or 1 value, depending on whether the input is true or false.
The '''0/1''' node converts a [[Type:bool|bool]] value into a <code>0</code> or <code>1</code> value depending on whether the input is true or false.
 
== Inputs ==
=== Boolean ([[Type:Bool |bool]]) ===
The input bool to convert to the given output type.
 
== Outputs ==
=== * (Variant) ===
The output, whose type is dependent in the specific variant spawned. All variants of this node and their outputs are as follows:


This node has the following variants, with their respective outputs:
{| class="wikitable"
{| class="wikitable"
! Variant !! Node Type !! False Output !! True Output
! Variant !! Node Type !! False Output !! True Output
|-
|-
|Zero One (float) || <code>ZeroOneFloat</code>|| 0.0 || 1.0
|Zero One ([[Types:Float|float]]) || <code>ZeroOneFloat</code>|| 0.0 || 1.0
|-
|-
|Zero One (float2) || <code>ZeroOneFloat2</code> || [0.0;0.0] || [1.0;1.0]
|Zero One ([[Types:Float2|float2]]) || <code>ZeroOneFloat2</code> || [0.0; 0.0] || [1.0; 1.0]
|-
|-
|Zero One (float3) || <code>ZeroOneFloat3</code> || [0.0;0.0;0.0] || [1.0;1.0;1.0]
|Zero One ([[Types:Float3|float3]]) || <code>ZeroOneFloat3</code> || [0.0; 0.0; 0.0] || [1.0; 1.0; 1.0]
|-
|-
|Zero One (float4) || <code>ZeroOneFloat4</code> || [0.0;0.0;0.0;0.0] || [1.0;1.0;1.0;1.0]
|Zero One ([[Types:Float4|float4]]) || <code>ZeroOneFloat4</code> || [0.0; 0.0; 0.0; 0.0] || [1.0; 1.0; 1.0; 1.0]
|-
|-
|Zero One (int) || <code>ZeroOneInt</code> || 0 || 1
|Zero One ([[Types:Int|int]]) || <code>ZeroOneInt</code> || 0 || 1
|-
|-
|Zero One (int2) || <code>ZeroOneInt2</code> || [0;0] || [1;1]
|Zero One ([[Types:Int2|int2]]) || <code>ZeroOneInt2</code> || [0; 0] || [1; 1]
|-
|-
|Zero One (int3) || <code>ZeroOneInt3</code> || [0;0;0] || [1;1;1]
|Zero One ([[Types:Int3|int3]]) || <code>ZeroOneInt3</code> || [0; 0; 0] || [1; 1; 1]
|-
|-
|Zero One (int4) || <code>ZeroOneInt4</code> || [0;0;0;0] || [1;1;1;1]
|Zero One ([[Types:Int4|int4]]) || <code>ZeroOneInt4</code> || [0; 0; 0; 0] || [1; 1; 1; 1]
|}
|}
== Inputs ==
=== Boolean ([[Types:Bool |bool]]) ===
The input bool to convert to the given output type


== Outputs ==
=== * (Pseudo-Generic) ===
The output, whose type is dependent in the specific variant spawned.
[[Category:ProtoFlux:Operators]]
[[Category:ProtoFlux:Operators]]

Latest revision as of 17:34, 23 May 2024

0/1
Boolean
*
Operators

The 0/1 node converts a bool value into a 0 or 1 value depending on whether the input is true or false.

Inputs

Boolean (bool)

The input bool to convert to the given output type.

Outputs

* (Variant)

The output, whose type is dependent in the specific variant spawned. All variants of this node and their outputs are as follows:

Variant Node Type False Output True Output
Zero One (float) ZeroOneFloat 0.0 1.0
Zero One (float2) ZeroOneFloat2 [0.0; 0.0] [1.0; 1.0]
Zero One (float3) ZeroOneFloat3 [0.0; 0.0; 0.0] [1.0; 1.0; 1.0]
Zero One (float4) ZeroOneFloat4 [0.0; 0.0; 0.0; 0.0] [1.0; 1.0; 1.0; 1.0]
Zero One (int) ZeroOneInt 0 1
Zero One (int2) ZeroOneInt2 [0; 0] [1; 1]
Zero One (int3) ZeroOneInt3 [0; 0; 0] [1; 1; 1]
Zero One (int4) ZeroOneInt4 [0; 0; 0; 0] [1; 1; 1; 1]