// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputAxis.java
// public enum XInputAxis {
//     LEFT_THUMBSTICK_X, LEFT_THUMBSTICK_Y,
//     RIGHT_THUMBSTICK_X, RIGHT_THUMBSTICK_Y,
//     LEFT_TRIGGER, RIGHT_TRIGGER,
//     DPAD;
// }


import com.github.strikerx3.jxinput.enums.XInputAxis;
package com.github.strikerx3.jxinput;


/**
 * Contains the states of all XInput axes.
 *
 * @author Ivan "StrikerX3" Oliveira
 */
public class XInputAxes {
    public int lxRaw, lyRaw;
    public int rxRaw, ryRaw;

    public int ltRaw, rtRaw;

    public float lx, ly;
    public float rx, ry;

    public float lt, rt;

    public int dpad;

    public static final int DPAD_CENTER = -1;
    public static final int DPAD_UP_LEFT = 0;
    public static final int DPAD_UP = 1;
    public static final int DPAD_UP_RIGHT = 2;
    public static final int DPAD_RIGHT = 3;
    public static final int DPAD_DOWN_RIGHT = 4;
    public static final int DPAD_DOWN = 5;
    public static final int DPAD_DOWN_LEFT = 6;
    public static final int DPAD_LEFT = 7;

    protected XInputAxes() {
        reset();
    }

    /**
     * Gets the value from the specified axis.
     *
     * @param axis the axis
     * @return the value of the axis
     */
// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputAxis.java
// public enum XInputAxis {
//     LEFT_THUMBSTICK_X, LEFT_THUMBSTICK_Y,
//     RIGHT_THUMBSTICK_X, RIGHT_THUMBSTICK_Y,
//     LEFT_TRIGGER, RIGHT_TRIGGER,
//     DPAD;
// }


// Path: src/main/java/com/github/strikerx3/jxinput/XInputAxes.java
import com.github.strikerx3.jxinput.enums.XInputAxis;

package com.github.strikerx3.jxinput;


/**
 * Contains the states of all XInput axes.
 *
 * @author Ivan "StrikerX3" Oliveira
 */
public class XInputAxes {
    public int lxRaw, lyRaw;
    public int rxRaw, ryRaw;

    public int ltRaw, rtRaw;

    public float lx, ly;
    public float rx, ry;

    public float lt, rt;

    public int dpad;

    public static final int DPAD_CENTER = -1;
    public static final int DPAD_UP_LEFT = 0;
    public static final int DPAD_UP = 1;
    public static final int DPAD_UP_RIGHT = 2;
    public static final int DPAD_RIGHT = 3;
    public static final int DPAD_DOWN_RIGHT = 4;
    public static final int DPAD_DOWN = 5;
    public static final int DPAD_DOWN_LEFT = 6;
    public static final int DPAD_LEFT = 7;

    protected XInputAxes() {
        reset();
    }

    /**
     * Gets the value from the specified axis.
     *
     * @param axis the axis
     * @return the value of the axis
     */
    public float get(final XInputAxis axis) {