September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,6 +1,15 @@
|
|||
import Data.Complex (cis, phase)
|
||||
|
||||
meanAngle
|
||||
:: RealFloat c
|
||||
=> [c] -> c
|
||||
meanAngle = (/ pi) . (* 180) . phase . sum . map (cis . (/ 180) . (* pi))
|
||||
|
||||
main = mapM_ (\angles -> putStrLn $ "The mean angle of " ++ show angles ++ " is: " ++ show (meanAngle angles) ++ " degrees")
|
||||
[[350, 10], [90, 180, 270, 360], [10, 20, 30]]
|
||||
main :: IO ()
|
||||
main =
|
||||
mapM_
|
||||
(\angles ->
|
||||
putStrLn $
|
||||
"The mean angle of " ++
|
||||
show angles ++ " is: " ++ show (meanAngle angles) ++ " degrees")
|
||||
[[350, 10], [90, 180, 270, 360], [10, 20, 30]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue