Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,15 @@
open System
open System.Numerics
let deg2rad d = d * Math.PI / 180.
let rad2deg r = r * 180. / Math.PI
[<EntryPoint>]
let main argv =
let makeComplex = fun r -> Complex.FromPolarCoordinates(1., r)
argv
|> Seq.map (Double.Parse >> deg2rad >> makeComplex)
|> Seq.fold (fun x y -> Complex.Add(x,y)) Complex.Zero
|> fun c -> c.Phase |> rad2deg
|> printfn "Mean angle for [%s]: %g°" (String.Join("; ",argv))
0