naqsha-0.1.0.0: A library for working with geospatial data types.

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

Express angle in degrees.

Express angle in minutes.

Express angle in seconds.

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

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

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 #

Instances

 Source # Methods Source # Methods Source # Methods