A game about forced loneliness, made by TACStudios
1using UnityEngine; 2 3namespace Unity.VisualScripting 4{ 5 /// <summary> 6 /// Compares two inputs to determine whether they are not equal. 7 /// </summary> 8 [UnitCategory("Logic")] 9 [UnitOrder(6)] 10 public sealed class NotEqual : BinaryComparisonUnit 11 { 12 public NotEqual() : base() 13 { 14 numeric = false; 15 } 16 17 // Backward compatibility 18 protected override string outputKey => "notEqual"; 19 20 /// <summary> 21 /// Whether A is different than B. 22 /// </summary> 23 [DoNotSerialize] 24 [PortLabel("A \u2260 B")] 25 [PortKey("notEqual")] 26 public override ValueOutput comparison => base.comparison; 27 28 protected override bool NumericComparison(float a, float b) 29 { 30 return !Mathf.Approximately(a, b); 31 } 32 33 protected override bool GenericComparison(object a, object b) 34 { 35 return OperatorUtility.NotEqual(a, b); 36 } 37 } 38}