Singularity/Library/PackageCache/com.unity.visualscripting@1.../Runtime/VisualScripting.Flow/Framework/Logic/Greater.cs
2024-05-06 11:45:45 -07:00

27 lines
717 B
C#

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);
}
}
}