Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Greater.cs 717B

1234567891011121314151617181920212223242526
  1. namespace Unity.VisualScripting
  2. {
  3. /// <summary>
  4. /// Compares two inputs to determine whether the first is greater than the second.
  5. /// </summary>
  6. [UnitCategory("Logic")]
  7. [UnitOrder(11)]
  8. public sealed class Greater : BinaryComparisonUnit
  9. {
  10. /// <summary>
  11. /// Whether A is greater than B.
  12. /// </summary>
  13. [PortLabel("A > B")]
  14. public override ValueOutput comparison => base.comparison;
  15. protected override bool NumericComparison(float a, float b)
  16. {
  17. return a > b;
  18. }
  19. protected override bool GenericComparison(object a, object b)
  20. {
  21. return OperatorUtility.GreaterThan(a, b);
  22. }
  23. }
  24. }