Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!news.glorb.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.java.programmer Subject: Re: boolean to int : was char to decimal Followup-To: comp.lang.java.programmer Date: Tue, 10 May 2011 13:47:36 +1200 Organization: Geek Central Lines: 10 Message-ID: References: <92ea64F3avU1@mid.individual.net> NNTP-Posting-Host: 118-92-95-178.dsl.dyn.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: lust.ihug.co.nz 1304992056 14819 118.92.95.178 (10 May 2011 01:47:36 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Tue, 10 May 2011 01:47:36 +0000 (UTC) User-Agent: KNode/4.4.7 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3888 In message , Michael Wojcik wrote: > switch (((d2 > curve_collinearity_epsilon) << 1) + > (d3 > curve_collinearity_epsilon)) { > > I would have preferred binary-or there rather than addition, for > clarity, but either works. Using the bitwise operator allows you to remove some parentheses.