Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created September 17, 2013 17:16
Show Gist options
  • Save qoelet/6597471 to your computer and use it in GitHub Desktop.
Save qoelet/6597471 to your computer and use it in GitHub Desktop.
sinusoid :: [Double] -> Double -> Double -> Double -> [Double]
sinusoid [] _ _ _ = []
sinusoid (n:ns) amp ang_freq phase = amp * (cos (ang_freq * n + phase)) : sinusoid ns amp ang_freq phase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment