Allows you to calculate with angles in a type-safe manner in Haskell.
stack build
stack test
import Data.Angle
Create an angle from radians:
radians (2 * pi)
Create an angle from degrees:
degrees 180
Get an angle in radians
getRadians angle
Get an angle in degrees
getDegrees angle
Add two angles
angle1 ∠+∠ angle2
Subtract angles
angle1 ∠-∠ angle2
Multiply an angle with a number
angle ∠* n
Divide an angle with a number
angle ∠/ n
Divide two angles (and get a number)
angle1 ∠/∠ angle2
sine angle
cosine angle
tangent angle
Inverses gives an angle given a number:
arcsine x
arccosine x
arctangent x
Normalize an angle to between 0 and 2*pi radians:
normalizeAngle angle