• Creates an expression that evaluates whether the two given expression evaluate to the same value.

    Use this kind of expression as the if-expression in an ifThenElse expression, as a when-expression in a cases expression or anywhere an expression that resolves to a boolean is required.

    Type Parameters

    • T extends string | number | boolean | Vector3

    Parameters

    • left: Expression<T>

      The first expression to evaluate.

    • right: Expression<T>

      The second expression to evaluate.

    Returns Expression<boolean>

    An expression that evaluates to true if the two expressions evaluate to the same value.

  • Creates an expression that evaluates whether the two given expression evaluate to the same value.

    Use this kind of expression as the if-expression in an ifThenElse expression, as a when-expression in a cases expression or anywhere an expression that resolves to a boolean is required.

    Parameters

    • left: Expression<number>

      The first expression to evaluate.

    • right: Expression<number>

      The second expression to evaluate.

    • Optional threshold: Expression<number>

      The Expression describing the maximum threshold before considering both values not equal.

    Returns Expression<boolean>

    An expression that evaluates to true if the two expressions evaluate to the same value.