Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
17
Task/Averages-Mean-angle/Haskell/averages-mean-angle-2.hs
Normal file
17
Task/Averages-Mean-angle/Haskell/averages-mean-angle-2.hs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- file: trigdeg.fs
|
||||
|
||||
deg2rad deg = deg*pi/180.0
|
||||
rad2deg rad = rad*180.0/pi
|
||||
|
||||
sind = sin . deg2rad
|
||||
cosd = cos . deg2rad
|
||||
tand = tan . deg2rad
|
||||
atand = rad2deg . atan
|
||||
atan2d y x = rad2deg (atan2 y x )
|
||||
|
||||
avg_angle angles = atan2d y x
|
||||
where
|
||||
y = mean (map sind angles)
|
||||
x = mean (map cosd angles)
|
||||
|
||||
-- End of trigdeg.fs --------
|
||||
Loading…
Add table
Add a link
Reference in a new issue