Logic Category

  • The following list shows the Logic Category Magma nodes available in Krakatoa MX 2.x.
  • These nodes are used to perform logical operations using Boolean values, and control data flow using conditional operators.

Equal

  • The Equal operator has two inputs and one output.
  • The operator has a >Use Tolerance checkbox and Tolerance Exp. value for controlling the tolerance when comparing Float values.
  • The two inputs must be of the same type to be compared.

Input 1: Left Scalar (Float or Integer)

  • The first input has no default value when unconnected.

Input 2: Right Scalar (Float or Integer)

  • The second input has a default Float value of 0.0.
  • The default value type can be switched to Vector or Integer.

Output 1: Boolean

  • The output is True if the values of the two inputs are equal, False if not equal.

Greater

  • The Greater operator has two inputs and one output.
  • The two inputs must be of compativle types to be compared - both Scalars or both Vectors.

Input 1: Left Scalar (Float or Integer)

  • The first input has no default value when unconnected.

Input 2: Right Scalar (Float or Integer)

  • The second input has a default Float value of 0.0.
  • The default value type cannot be changed.

Output 1: Boolean

  • The output is True if the first input’s values is greater than the value of the second input, False if equal or less than the second input.

GreaterOrEqual

  • The GreaterOrEqual operator has two inputs and one output.
  • The two inputs must be of the same Scalar type to be compared - both Floats or both Integers.

Input 1: Left Scalar (Float or Integer)

  • The first input has no default value when unconnected.

Input 2: Left Scalar (Float or Integer)

  • The second input has a default Float value of 0.0.
  • The default value type cannot be changed.

Output 1: Boolean

  • The output is True if the first input’s values is greater than or equal to the value of the second input, False if less than the second input.

Less

  • The Less operator has two inputs and one output.
  • The two inputs must be of the same Scalar type to be compared - both Floats or both Integers.

Input 1: Left Scalar (Float or Integer)

  • The first input has no default value when unconnected.

Input 2: Left Scalar (Float or Integer)

  • The second input has a default Float value of 0.0.
  • The default value type cannot be changed.

Output 1: Boolean

  • The output is True if the first input’s values is less than the value of the second input, False if equal or greater.

LessOrEqual

  • The LessOrEqual operator has two inputs and one output.
  • The two inputs must be of the same type to be compared.

Input 1: Left Scalar (Float or Integer)

  • The first input has no default value when unconnected.

Input 2: Left Scalar (Float or Integer)

  • The second input has a default Float value of 0.0.
  • The default value type cannot be changed.

Output 1: Boolean

  • The output is True if the first input’s values is less than or equal to the value of the second input, False if greater.

LogicalAnd

  • The LogicalAnd operator has two inputs and one output.
  • The two inputs must be of Boolean type.

Input 1: Boolean

  • The first input has no default value when unconnected.

Input 2: Boolean

  • The second input has no default value when unconnected.

Output 1: Boolean

  • The output is True if both inputs are True, False if at least one of them has a value of False .

LogicalNot

  • The LogicalAnd operator has one input and one output.

Input 1: Boolean

  • The input has no default value when unconnected.

Output 1: Boolean

  • The output is True if the input is False, and False if the input is True.

LogicalOr

  • The LogicalOr operator has two inputs and one output.
  • The two inputs must be of Boolean type.

Input 1: Boolean

  • The first input has no default value when unconnected.

Input 2: Boolean

  • The second input has no default value when unconnected.

Output 1: Boolean

  • The output is True if at least one of the input is True, False if both inputs are False.

LogicalXor

  • The LogicalXor operator has two inputs and one output.
  • The two inputs must be of Boolean type.

Input 1: Boolean

  • The first input has no default value when unconnected.

Input 2: Boolean

  • The second input has no default value when unconnected.

Output 1: Boolean

  • The output is True if exactly one of the two input is True, False if both inputs are False or both inputs are True.

Mux

  • The Mux operator is the Magma equivalent to an CASE construct in a programming language.
  • The Mux operator has a variable number of inputs and one output.
  • The number of inputs is controlled by a property in the operator’s UI, defaults to 3 and cannot be less than 3.

Inputs 0 to N-2

  • The first N-1 inputs can be of any type, prefereably of the same type to ensure consistent output type.

Input N: Selector

  • The last input is always the Selector input
  • It must be of type Integer

Output 1: Value

  • The output is the value of the input selected by the Selector input’s zero-based integer value.
  • If the last input is 0, the first input is sent out
  • If the input is 1, the second input is sent out and so on.
  • If the last input’s value is less than 0, the output will be the first input’s value.
  • If the last input’s value is greater than the number of inputs minus 2, the second-to-last input’s value will be sent out.

Switch

  • The Switch operator is the Magma equivalent to an IF THEN ELSE construct in a programming language.
  • The Switch operator has three inputs and one output.
  • The first two inputs values can be of any type, preferably of the same type to ensure consistent output type.

Input 1: Input 0

  • The first input’s value will be sent out when the third input’s Selector value is True.

Input 2: Input 1

  • The second input’s value will be sent out when the third input’s Selector value is False.

Input 3: Selector

  • The third input must be of Boolean type.

Output 1: Value

  • The output of the operator will be the first input’s value if the third input is True, and the second input’s value if the third input is False.