Skip to content

Instantly share code, notes, and snippets.

@bjornharrtell
Created March 19, 2012 18:09
Show Gist options
  • Save bjornharrtell/2122201 to your computer and use it in GitHub Desktop.
Save bjornharrtell/2122201 to your computer and use it in GitHub Desktop.
This works! :) and is now a one-liner! :)
if ((delta & 7) > 4) rightOf else leftOf
@bjornharrtell
Copy link
Author

It sure does, which also shortens the code in question to a one liner. Great work Peter! Reminds me that I want to understand bitwise operations better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment