using UnityEngine.Scripting;
namespace UnityEngine.InputSystem.Processors
{
///
/// An input processor that inverts its input value.
///
///
/// This process is registered (see as "invert" by default.
///
///
///
/// // Bind to the gamepad's left trigger such that it returns inverted values.
/// new InputAction(binding: "<Gamepad>/leftTrigger", processors="invert");
///
///
///
public class InvertProcessor : InputProcessor
{
///
/// Return the inverted value of .
///
/// Input value.
/// Ignored.
/// Invert value.
public override float Process(float value, InputControl control)
{
return value * -1.0f;
}
///
public override string ToString()
{
return "Invert()";
}
}
}