First let's look at the code before you fucked it up: https://github.com/Themaister/RetroArch/blob/0f2e36d34921ef767042173f54f575c3cd2e62b7/gx/gx_input.c
In particular:
#define gx_stick_x(x) ((s8)((sin((x).ang * M_PI / 180.0f)) * (x).mag * 128.0f))
#define gx_stick_y(x) ((s8)((cos((x).ang * M_PI...
You don't need a CC pro, you made the same stupid mistake in the nunchuk code. I guess you didn't notice because you were too busy blaming your mistakes on everyone else.