naqsha-0.1.0.0: A library for working with map and various maping formats.

Safe HaskellNone
LanguageHaskell2010

Naqsha.Geometry.Angle

Description

Basic types associated with geometry.

Synopsis

Documentation

data Angle Source #

An abstract angle. Internally, angles are represented as a 64-bit integer with each unit contribute 1/2^64 fraction of a complete circle. This means that angles are accurate up to a resolution of 2 π / 2^64 radians. Angles form a group under the angular addition and the fact that these are represented as integers means one can expect high speed accurate angle arithmetic.

When expressing angles one can use a more convenient notation:

myAngle   = degree 21.71167
yourAngle = degree 21 <> minute 42 <> second 42

Instances

Bounded Angle Source # 
Enum Angle Source # 
Eq Angle Source # 

Methods

(==) :: Angle -> Angle -> Bool #

(/=) :: Angle -> Angle -> Bool #

Ord Angle Source # 

Methods

compare :: Angle -> Angle -> Ordering #

(<) :: Angle -> Angle -> Bool #

(<=) :: Angle -> Angle -> Bool #

(>) :: Angle -> Angle -> Bool #

(>=) :: Angle -> Angle -> Bool #

max :: Angle -> Angle -> Angle #

min :: Angle -> Angle -> Angle #

Read Angle Source # 
Show Angle Source # 

Methods

showsPrec :: Int -> Angle -> ShowS #

show :: Angle -> String #

showList :: [Angle] -> ShowS #

Monoid Angle Source # 

Methods

mempty :: Angle #

mappend :: Angle -> Angle -> Angle #

mconcat :: [Angle] -> Angle #

Default Angle Source # 

Methods

def :: Angle #

Group Angle Source # 

Methods

invert :: Angle -> Angle #

pow :: Integral x => Angle -> x -> Angle #

Unbox Angle Source # 
Angular Angle Source # 

Methods

toAngle :: Angle -> Angle Source #

Vector Vector Angle Source # 
MVector MVector Angle Source # 
data Vector Angle Source # 
data MVector s Angle Source # 

degree :: Rational -> Angle Source #

Express angle in degrees.

minute :: Rational -> Angle Source #

Express angle in minutes.

second :: Rational -> Angle Source #

Express angle in seconds.

radian :: Double -> Angle Source #

Express angle in radians

toDegree :: Fractional r => Angle -> r Source #

Measure angle in degrees. This conversion may lead to loss of precision.

toRadian :: Angle -> Double Source #

Measure angle in radians. This conversion may lead to loss of precision.

class Angular a where Source #

Angular quantities.

Minimal complete definition

toAngle

Methods

toAngle :: a -> Angle Source #