Help with video game controller using rotary encoder on the Arduino Leonardo

The Serial Monitor shows very precise values for the rotary encoder, so I assume that it's working correctly. The values don't skip or judder. I assume that if it's not set up right, it will give incorrect readings.