angle method
Calculates the angle of a specified joystick on a given gamepad port.
The angle is in degrees, where 0 degrees is typically pointing upwards, 90 degrees is right, 180 is down, and 270 is left.
Returns the angle in degrees (0-359). If the joystick is centered (x=0, y=0),
the angle might be consistently 90 degrees or another default depending on atan2Degree
behavior.
Implementation
double angle(int port, Joystick joystick) {
var x = joyX(port, joystick);
var y = joyY(port, joystick);
return (atan2Degree(y, x) + 360 + 90) % 360;
}