<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>((term &amp; 0x1) ==0) just test if least significant bit is unset<br></div>? (term | 1) will set the LSB to 1 if unset<br></div>: (term &amp; ~1) will unset the LSB if set<br><br></div>so, all it does is (term bitXOr: 1), that is it changes the LSB of term...<br><br></div>The name termPlus1 is misleading.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-06 4:41 GMT+01:00 Robert Withers <span dir="ltr">&lt;<a href="mailto:robert.w.withers@gmail.com" target="_blank">robert.w.withers@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I still have some rot in my head, from too much java, and so I don&#39;t think consistently clearly, it&#39;s more cyclic I&#39;ve noticed. As a result, my eyes are doing back-flips when looking at this code; perhaps I need eine kleine pause...does anyone else want to try it?<br>
<br>
    int termPlus1 = ((term &amp; 0x1) == 0) ? (term | 1) : (term &amp; ~1);<br>
<br>
cheers,<br>
Robert<br>
<br>
ps. an example of Java conciseness, dear God.<br>
<br>
</blockquote></div><br></div>