I want to calculate the weighted mean of a set of angles.
In this Question, there's an answer how to calculate the mean as shown in this page.
Now I'm trying to figure out how to calculate the weighted average. That is, for each angle there is a weight (the weights sum up to 1)
0.25, 0 degrees 0.5, 20 degrees 0.25, 90 degrees
The weighted avg should (if I didn't make a mistake) be 32 degrees.