A game about forced loneliness, made by TACStudios
1using UnityEngine;
2
3namespace Unity.VisualScripting
4{
5 /// <summary>
6 /// Compares two inputs to determine whether the first is less than or equal to the second.
7 /// </summary>
8 [UnitCategory("Logic")]
9 [UnitOrder(10)]
10 public sealed class LessOrEqual : BinaryComparisonUnit
11 {
12 /// <summary>
13 /// Whether A is greater than or equal to B.
14 /// </summary>
15 [PortLabel("A \u2264 B")]
16 public override ValueOutput comparison => base.comparison;
17
18 protected override bool NumericComparison(float a, float b)
19 {
20 return a < b || Mathf.Approximately(a, b);
21 }
22
23 protected override bool GenericComparison(object a, object b)
24 {
25 return OperatorUtility.LessThanOrEqual(a, b);
26 }
27 }
28}