Last active
May 30, 2018 13:40
-
-
Save SadPandaBear/b58b7bef895261537649073d4730169f to your computer and use it in GitHub Desktop.
Haskell: Rotation of Axes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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