java.lang.Object
org.firstinspires.ftc.teamcode.fy23.gamepad2.primitives.axes.MergedAxis
All Implemented Interfaces:
Axis

public class MergedAxis extends Object implements Axis
Use this to combine two axes that only run from 0 to 1 into one axis that runs from -1 to 1.
  • Constructor Details

    • MergedAxis

      public MergedAxis(Axis axis1, Axis axis2)
      Parameters:
      axis1 - Represents the negative direction (-1 to 0).
      axis2 - Represents the positive direction (0 to 1).
  • Method Details

    • value

      public double value()
      Description copied from interface: Axis
      The value of an axis depends on the implementation and its parameters.
      Specified by:
      value in interface Axis
      Returns:
      Returns axis2.value() - axis1.value().