Package ca.team3161.lib.utils.controls
Class CubedJoystickMode
- java.lang.Object
-
- ca.team3161.lib.utils.controls.CubedJoystickMode
-
- All Implemented Interfaces:
JoystickMode
,java.util.function.Function<java.lang.Double,java.lang.Double>
public final class CubedJoystickMode extends java.lang.Object implements JoystickMode
A JoystickMode which cubes the Joystick's raw input, but preserves sign. 0.8 on an axis becomes 0.512, for example, but -0.8 becomes -0.512.
-
-
Constructor Summary
Constructors Constructor Description CubedJoystickMode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
adjust(double raw)
Applies some transformation function to the input and returns a result.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.team3161.lib.utils.controls.JoystickMode
andThen, apply, compose
-
-
-
-
Method Detail
-
adjust
public double adjust(double raw)
Description copied from interface:JoystickMode
Applies some transformation function to the input and returns a result.- Specified by:
adjust
in interfaceJoystickMode
- Parameters:
raw
- the value to adjust- Returns:
- the adjusted value
-
-