File size: 717 Bytes
18a519f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
namespace Unity.VisualScripting
{
    /// <summary>
    /// Compares two inputs to determine whether the first is greater than the second.
    /// </summary>
    [UnitCategory("Logic")]
    [UnitOrder(11)]
    public sealed class Greater : BinaryComparisonUnit
    {
        /// <summary>
        /// Whether A is greater than B.
        /// </summary>
        [PortLabel("A > B")]
        public override ValueOutput comparison => base.comparison;

        protected override bool NumericComparison(float a, float b)
        {
            return a > b;
        }

        protected override bool GenericComparison(object a, object b)
        {
            return OperatorUtility.GreaterThan(a, b);
        }
    }
}