geodetic-0.1.4: Geodetic calculations

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Geo.Geodetic.Sphere

Description

A sphere with a radius in metres.

Documentation

data Sphere Source

Instances

Eq Sphere 
Ord Sphere 
Show Sphere

A show instance that prints to 4 decimal places. This is to take floating-point rounding errors into account.

AsSphere p f Sphere 

class AsSphere p f s where Source

Minimal complete definition

Nothing

Methods

_Sphere :: Optic' p f s Sphere Source

Instances

(Functor f, Profunctor p) => AsSphere p f Double

An isomorphism on sphere to a double.

>>> (7 :: Double) ^. _Sphere
Sphere 7.0000
>>> (0 :: Double) ^. _Sphere
Sphere 0.0000
>>> (-7 :: Double) ^. _Sphere
Sphere -7.0000
AsSphere p f Sphere