Skip to main content
Mod Removes Wiki by Doorknob
added 111 characters in body
Source Link
ugoren
  • 17.5k
  • 5
  • 52
  • 74

Define parameters instead of variables.

f(x){int y=x+1;...}

f(x,y){y=x+1;...}

You don't need to actually pass the second parameter.

Also, you can use operator precedence to save parenthesis.
For example, (x+y)*2 can become x+y<<1.

Define parameters instead of variables.

f(x){int y=x+1;...}

f(x,y){y=x+1;...}

You don't need to actually pass the second parameter.

Define parameters instead of variables.

f(x){int y=x+1;...}

f(x,y){y=x+1;...}

You don't need to actually pass the second parameter.

Also, you can use operator precedence to save parenthesis.
For example, (x+y)*2 can become x+y<<1.

Source Link
ugoren
  • 17.5k
  • 5
  • 52
  • 74

Define parameters instead of variables.

f(x){int y=x+1;...}

f(x,y){y=x+1;...}

You don't need to actually pass the second parameter.