Skip to content

Instantly share code, notes, and snippets.

@SadPandaBear
Last active May 30, 2018 13:40
Show Gist options
  • Save SadPandaBear/b58b7bef895261537649073d4730169f to your computer and use it in GitHub Desktop.
Save SadPandaBear/b58b7bef895261537649073d4730169f to your computer and use it in GitHub Desktop.
Haskell: Rotation of Axes
rotate :: (Double, Double) -> Double -> (Double, Double)
rotate (x, y) a = (x', y')
where
co = cos a
si = sin a
x' = x * co - y * si
y' = x * si + y * co
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment