If you pass integers derived from floats (where the fractional parts are simply 
truncated) you can get a not-banker-rounded result by adding 0.5 to the float 
values (that will be truncated).

But I think your point is well taken -- in the context of computing pixel 
positions (that are inherently integral) you don't want banker's rounding to be 
used.

Perhaps that's why many math libraries include more than one set of rounding 
methods...

At 09:21 AM 4/20/2006, Peter Ritchie wrote
>Except--unlike mathematical calculations--with drawing, I want
>consistency; not statistical unbiasedness as my number of calculations
>approach infinity.  I certainly don't want all my even coordinate pixels
>to be on one side of the line and all my odd coordinate pixels to be on
>the other.
>[snip]


J. Merrill / Analytical Software Corp

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to