joyX method
Gets the current X-axis value of a specified joystick on a given gamepad port.
Returns the X-axis value, typically ranging from -1.0 (left) to 1.0 (right). Returns 0.0 if the port or joystick is invalid.
Implementation
double joyX(int port, Joystick joystick) {
int index = joystick.index;
if (port < 0 || port >= _input.length) return 0.0;
if (index < 0 || index >= _input[port].xAxis.length) return 0.0;
return _input[port].xAxis[index];
}