Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    \$\begingroup\$ You can save another byte with a trick @ETHProductions showed me: change m=4-m to m^=2. \$\endgroup\$ Commented Nov 16, 2017 at 18:39
  • \$\begingroup\$ @RickHitchcock Ah, of course.. I use ^=1 pretty often in answers when I want to alter between 0 and 1. ^=2 works in this case to alter between 1 and 3. Nice trick, and thanks for the comment to mention it. :) \$\endgroup\$ Commented Nov 16, 2017 at 18:49