piclist 2001\04\06\111926a >
Thread: Rounding to closest 1's multiple, code enclosed :)
www.piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : Kübek Tonyemail (remove spam text)



Hi,

Scott Dattalo wrote:
>Rounding to nearest 2 is really trivial:
>
>If LSBit is set then add 1.

Yes I know, the same goes for 1 it's *very* trivial :).

It's main use is for 5, however input granularity 1 and 2
doesn't 'brake' the routine. Still outputs what's expected.

But ofcource who want's to waste cycles ?.


/Tony




Tony Kübek, Flintab AB            
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
E-mail: spamtony.kubekspamBeGonespam.....flintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-request.....spammitvma.mit.edu


<200104061514.RAA02331@mn10.swip.net> quoted-printable

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Rounding to closest 1's multiple, code enclosed :)

month overview.

new search...