暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Less.cs 704B

1234567891011121314151617181920212223242526
  1. namespace Unity.VisualScripting
  2. {
  3. /// <summary>
  4. /// Compares two inputs to determine whether the first is less than the second.
  5. /// </summary>
  6. [UnitCategory("Logic")]
  7. [UnitOrder(9)]
  8. public sealed class Less : BinaryComparisonUnit
  9. {
  10. /// <summary>
  11. /// Whether A is less 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.LessThan(a, b);
  22. }
  23. }
  24. }