Good point I have rotated the problem. This doesn't cleanly solve the -1,0,1 problem. The circular number system will solve the two number average if the negative number(s) are always normalized positive (((-179 + 360) +179) / 2) MOD 360 . This will not work for averaging three angles. w.. Howard Winter wrote: > > Walter, > > On Thu, 16 Sep 2004 08:56:46 -0400, Walter Banks wrote: > > > The problem is the discontinuity in the number system being used. Creating a continuous wrap around number > system representing the compass as 0 to 179 180 -179 to -1 makes all of the averaging problems go away. > Conversion of negative numbers requires a simple add of 360. > > I think you've just shifted the problem 180 degrees: average of -1 and 1 is 0, which is correct. But the > average of -179 and 179 is also 0, which is wrong (should be 180 or -180). > > Cheers, > > Howard Winter > St.Albans, England > > _______________________________________________ > http://www.piclist.com > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist