Anonymous user
Averages/Mean angle: Difference between revisions
→{{header|Julia}}
(Add Swift) |
|||
Line 986:
Julia has built-in functions <code>sind</code> and <code>cosd</code> to compute the sine and cosine of angles specified in degrees accurately (avoiding the roundoff errors incurred in conversion to radians), and a built-in function to convert radians to degrees (or vice versa). Using these:
<lang julia>using Statistics
meandegrees(degrees) =
The output is:
<lang julia>julia> meandegrees([350, 10])
|