namespace Unity.VisualScripting { [UnitOrder(201)] public abstract class Absolute : Unit { /// /// The value to make positive. /// [DoNotSerialize] [PortLabelHidden] public ValueInput input { get; private set; } /// /// The positive value. /// [DoNotSerialize] [PortLabelHidden] public ValueOutput output { get; private set; } protected override void Definition() { input = ValueInput(nameof(input)); output = ValueOutput(nameof(output), Operation).Predictable(); Requirement(input, output); } protected abstract TInput Operation(TInput input); public TInput Operation(Flow flow) { return Operation(flow.GetValue(input)); } } }