naqsha-0.3.0.0: A library for working with anything map related.

Safe HaskellNone
LanguageHaskell2010

Naqsha.Geometry.Internal

Description

The internal module that exposes the basic geometric types in naqsha. This interface is subject to change and hence use with caution.

Synopsis

Documentation

newtype 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

Constructors

Angle 

Fields

Instances
Bounded Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Enum Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Eq Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Methods

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

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

Ord Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

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 # 
Instance details

Defined in Naqsha.Geometry.Internal

Show Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Methods

showsPrec :: Int -> Angle -> ShowS #

show :: Angle -> String #

showList :: [Angle] -> ShowS #

Semigroup Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Methods

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

sconcat :: NonEmpty Angle -> Angle #

stimes :: Integral b => b -> Angle -> Angle #

Monoid Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Methods

mempty :: Angle #

mappend :: Angle -> Angle -> Angle #

mconcat :: [Angle] -> Angle #

Bits Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Group Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Methods

invert :: Angle -> Angle #

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

Unbox Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Angular Angle Source # 
Instance details

Defined in Naqsha.Geometry.Angle

Methods

toAngle :: Angle -> Angle Source #

Vector Vector Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

MVector MVector Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype Vector Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype MVector s Angle Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype MVector s Angle = MAngV (MVector s Int64)

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.

newtype Latitude Source #

The latitude of a point. Positive denotes North of Equator where as negative South.

Constructors

Latitude 

Fields

Instances
Bounded Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Eq Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Ord Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Read Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Show Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Bits Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Angular Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Angle

Vector Vector Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

MVector MVector Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype Vector Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype MVector s Latitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype Longitude Source #

The longitude of a point. Positive denotes East of the Greenwich meridian where as negative denotes West.

Constructors

Longitude 

Fields

Instances
Bounded Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Eq Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Ord Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Read Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Show Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Semigroup Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Monoid Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Bits Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Group Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

Angular Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Angle

Vector Vector Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

MVector MVector Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype Vector Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

newtype MVector s Longitude Source # 
Instance details

Defined in Naqsha.Geometry.Internal

lat :: Angle -> Latitude Source #

Construct latitude out of an angle.

lon :: Angle -> Longitude Source #

Convert angles to longitude.