Skip to content

Instantly share code, notes, and snippets.

@shonumi
Created May 31, 2015 15:54
Show Gist options
  • Save shonumi/a4725247ebaa3c6d9a7b to your computer and use it in GitHub Desktop.
Save shonumi/a4725247ebaa3c6d9a7b to your computer and use it in GitHub Desktop.
Original...
// If analog input is beyond dead zone, set it
if (CheckDeadZone(val)) {
controller.pad_state.hex |= KeyMap::GetPadKey({pad_id, joypad_id}).hex;
} else {
controller.pad_state.hex &= ~KeyMap::GetPadKey({pad_id, joypad_id}).hex;
}
VS...
// If analog input is beyond dead zone, set it
if (CheckDeadZone(val)) {
controller.pad_state.hex |= KeyMap::GetPadKey({pad_id, joypad_id}).hex;
} else controller.pad_state.hex &= ~KeyMap::GetPadKey({pad_id, joypad_id}).hex;
Is the above^ the preferred style?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment