> The trouble is, you don't know the center point until you get the=20 > average, and need the center point to to get the average What I intended by 'arbitrary' was any centre point chosen. 0 deg for the OP as he describes it So if you go back to the OP's original example, with 0/360 degrees as the reference point and 5 samples 358 359 0 1 2 (-2 -1 0 +1 +2) / 5 =3D 0 wrt 0ref If the two waves were completely out of phase (+178 +179 +180 +181 +182) / 5 =3D 180 wrt 0ref My original idea was to find the relative magnitude of the value, so that you aren't finding (+358 +359 +0 +1 +2) / 5 + 0ref, which would give the result 144. At some point the value must be treated as relatively negative for calculations Hence if you use 0 as the reference and 180 as the negativity pivot, (-2 -1 0 +181 +182) =3D 180 wrt 0ref WITHOUT a division If the values were 177 176 182 183 181, the average is 179.8 -3 -4 +2 +3 +1 =3D -1 wrt 180 -1 / 5 =3D -0.2 =3D> +180 =3D 179.8 wrt 0 Joe --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .