code: func (js *joystickState) getAxis(joystick Joystick, axis int) float64 {
  	// Check that the joystick and axis is valid, return 0 by default.
  	if js.axis[joystick] == nil || axis >= len(js.axis[joystick]) || axis < 0 {
  		return 0
  	}
  	return float64(js.axis[joystick][axis])
  }
docs: // Returns the value of a joystick axis, returning 0 if the button or joystick is invalid.