Re: Programming question

From: Robert Raiford <eraifo01_at_fiu.edu>
Date: Thu Oct 28 1999 - 02:26:21 EDT

> One other trick that seems OK is just to take the x and y distance between
> two points (just use the upper byte if you're using 16 bit numebrs), shift
> them left once, add them together, and shift that result right twice.
It's
> not a square root (more like a weird average), but it gives you a pretty
> proportional number that's fairly predictable over most of the range.

Clay, how is this different than just adding them and shifting right once
(in either order)? Isn't this just dividing their sum by 2? Or is there
some value in losing the MSB?

Rob
Received on Thu Oct 28 01:26:43 1999

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:47 EDT