Provides unary operation functions for use in HotMesh mapping rules. The functions facilitate unary operations such as logical negation, making a number positive or negative, and bitwise negation during the mapping process. Each transformation is a function that expects one input parameter from the prior row in the @pipe structure.

Invoked in mapping rules using {@unary.<method>} syntax.

Constructors

Methods

  • Returns the bitwise negation of a number using the bitwise NOT operator (~).

    Parameters

    • value: number

      The number to bitwise negate

    Returns number

    The bitwise negation of the value

    bitwise_not_value:
    "@pipe":
    - ["{a.output.data.value}"]
    - ["{@unary.bitwise_not}"]
  • Returns the negative representation of a number using the unary negation operator.

    Parameters

    • value: number

      The number to negate

    Returns number

    The negated number

    negative_value:
    "@pipe":
    - ["{a.output.data.value}"]
    - ["{@unary.negative}"]
  • Returns the logical negation of a boolean value.

    Parameters

    • value: boolean

      The boolean value to negate

    Returns boolean

    The negated boolean value

    not_value:
    "@pipe":
    - ["{a.output.data.value}"]
    - ["{@unary.not}"]
  • Returns the positive representation of a number using the unary plus operator.

    Parameters

    • value: number

      The number to convert

    Returns number

    The positive representation of the value

    positive_value:
    "@pipe":
    - ["{a.output.data.value}"]
    - ["{@unary.positive}"]