Maze / Library /PackageCache /com.unity.visualscripting@1.8.0 /Runtime /VisualScripting.Flow /Framework /Logic /NotEqual.cs
| using UnityEngine; | |
| namespace Unity.VisualScripting | |
| { | |
| /// <summary> | |
| /// Compares two inputs to determine whether they are not equal. | |
| /// </summary> | |
| [] | |
| [] | |
| public sealed class NotEqual : BinaryComparisonUnit | |
| { | |
| public NotEqual() : base() | |
| { | |
| numeric = false; | |
| } | |
| // Backward compatibility | |
| protected override string outputKey => "notEqual"; | |
| /// <summary> | |
| /// Whether A is different than B. | |
| /// </summary> | |
| [] | |
| [] | |
| [] | |
| public override ValueOutput comparison => base.comparison; | |
| protected override bool NumericComparison(float a, float b) | |
| { | |
| return !Mathf.Approximately(a, b); | |
| } | |
| protected override bool GenericComparison(object a, object b) | |
| { | |
| return OperatorUtility.NotEqual(a, b); | |
| } | |
| } | |
| } | |