Skip to content

Instantly share code, notes, and snippets.

@Underdoge
Created March 6, 2017 05:54
Show Gist options
  • Save Underdoge/db71421a8cf081d2c80eeb508ae514f8 to your computer and use it in GitHub Desktop.
Save Underdoge/db71421a8cf081d2c80eeb508ae514f8 to your computer and use it in GitHub Desktop.
circleOfNumbers
function circleOfNumbers(n, firstNumber) {
return (firstNumber*2==n)?0:(firstNumber<(n/2))?firstNumber+(n/2):firstNumber-(n/2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment