meanangle function

mean angle