AC-Angle
Safe HaskellNone
LanguageHaskell98

Data.Angle

Description

Deal with angles measured in degrees or radians.

Names are kept deliberately different from the standard prelude to avoid name clashes.

Synopsis

Documentation

newtype Radians x Source #

An angle in radians.

Constructors

Radians x 

Instances

Instances details
Angle Radians Source # 
Instance details

Defined in Data.Angle

Methods

sine :: Floating x => Radians x -> x Source #

cosine :: Floating x => Radians x -> x Source #

tangent :: Floating x => Radians x -> x Source #

arcsine :: Floating x => x -> Radians x Source #

arccosine :: Floating x => x -> Radians x Source #

arctangent :: Floating x => x -> Radians x Source #

Num x => Num (Radians x) Source # 
Instance details

Defined in Data.Angle

Methods

(+) :: Radians x -> Radians x -> Radians x #

(-) :: Radians x -> Radians x -> Radians x #

(*) :: Radians x -> Radians x -> Radians x #

negate :: Radians x -> Radians x #

abs :: Radians x -> Radians x #

signum :: Radians x -> Radians x #

fromInteger :: Integer -> Radians x #

Fractional x => Fractional (Radians x) Source # 
Instance details

Defined in Data.Angle

Methods

(/) :: Radians x -> Radians x -> Radians x #

recip :: Radians x -> Radians x #

fromRational :: Rational -> Radians x #

Show x => Show (Radians x) Source # 
Instance details

Defined in Data.Angle

Methods

showsPrec :: Int -> Radians x -> ShowS #

show :: Radians x -> String #

showList :: [Radians x] -> ShowS #

Eq x => Eq (Radians x) Source # 
Instance details

Defined in Data.Angle

Methods

(==) :: Radians x -> Radians x -> Bool #

(/=) :: Radians x -> Radians x -> Bool #

Ord x => Ord (Radians x) Source # 
Instance details

Defined in Data.Angle

Methods

compare :: Radians x -> Radians x -> Ordering #

(<) :: Radians x -> Radians x -> Bool #

(<=) :: Radians x -> Radians x -> Bool #

(>) :: Radians x -> Radians x -> Bool #

(>=) :: Radians x -> Radians x -> Bool #

max :: Radians x -> Radians x -> Radians x #

min :: Radians x -> Radians x -> Radians x #

newtype Degrees x Source #

An angle in degrees.

Constructors

Degrees x 

Instances

Instances details
Angle Degrees Source # 
Instance details

Defined in Data.Angle

Methods

sine :: Floating x => Degrees x -> x Source #

cosine :: Floating x => Degrees x -> x Source #

tangent :: Floating x => Degrees x -> x Source #

arcsine :: Floating x => x -> Degrees x Source #

arccosine :: Floating x => x -> Degrees x Source #

arctangent :: Floating x => x -> Degrees x Source #

Num x => Num (Degrees x) Source # 
Instance details

Defined in Data.Angle

Methods

(+) :: Degrees x -> Degrees x -> Degrees x #

(-) :: Degrees x -> Degrees x -> Degrees x #

(*) :: Degrees x -> Degrees x -> Degrees x #

negate :: Degrees x -> Degrees x #

abs :: Degrees x -> Degrees x #

signum :: Degrees x -> Degrees x #

fromInteger :: Integer -> Degrees x #

Fractional x => Fractional (Degrees x) Source # 
Instance details

Defined in Data.Angle

Methods

(/) :: Degrees x -> Degrees x -> Degrees x #

recip :: Degrees x -> Degrees x #

fromRational :: Rational -> Degrees x #

Show x => Show (Degrees x) Source # 
Instance details

Defined in Data.Angle

Methods

showsPrec :: Int -> Degrees x -> ShowS #

show :: Degrees x -> String #

showList :: [Degrees x] -> ShowS #

Eq x => Eq (Degrees x) Source # 
Instance details

Defined in Data.Angle

Methods

(==) :: Degrees x -> Degrees x -> Bool #

(/=) :: Degrees x -> Degrees x -> Bool #

Ord x => Ord (Degrees x) Source # 
Instance details

Defined in Data.Angle

Methods

compare :: Degrees x -> Degrees x -> Ordering #

(<) :: Degrees x -> Degrees x -> Bool #

(<=) :: Degrees x -> Degrees x -> Bool #

(>) :: Degrees x -> Degrees x -> Bool #

(>=) :: Degrees x -> Degrees x -> Bool #

max :: Degrees x -> Degrees x -> Degrees x #

min :: Degrees x -> Degrees x -> Degrees x #

degrees :: Floating x => Radians x -> Degrees x Source #

Convert from radians to degrees.

radians :: Floating x => Degrees x -> Radians x Source #

Convert from degrees to radians.

class Angle (a :: Type -> Type) where Source #

Type-class for angles.

Methods

sine :: Floating x => a x -> x Source #

cosine :: Floating x => a x -> x Source #

tangent :: Floating x => a x -> x Source #

arcsine :: Floating x => x -> a x Source #

arccosine :: Floating x => x -> a x Source #

arctangent :: Floating x => x -> a x Source #

Instances

Instances details
Angle Degrees Source # 
Instance details

Defined in Data.Angle

Methods

sine :: Floating x => Degrees x -> x Source #

cosine :: Floating x => Degrees x -> x Source #

tangent :: Floating x => Degrees x -> x Source #

arcsine :: Floating x => x -> Degrees x Source #

arccosine :: Floating x => x -> Degrees x Source #

arctangent :: Floating x => x -> Degrees x Source #

Angle Radians Source # 
Instance details

Defined in Data.Angle

Methods

sine :: Floating x => Radians x -> x Source #

cosine :: Floating x => Radians x -> x Source #

tangent :: Floating x => Radians x -> x Source #

arcsine :: Floating x => x -> Radians x Source #

arccosine :: Floating x => x -> Radians x Source #

arctangent :: Floating x => x -> Radians x Source #