| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Geo.Geodetic.Bearing
Description
A bearing in degrees between 0 and 360.
Documentation
Instances
| Eq Bearing | |
| Ord Bearing | |
| Show Bearing | A show instance that prints to 4 decimal places. This is to take floating-point rounding errors into account. |
| AsBearing p f Bearing | |
| (Profunctor p, Functor f) => AsVincentyDirectResult p f (Coordinate, Bearing) |
class AsBearing p f s where Source
Minimal complete definition
Nothing
Instances
| (Choice p, Applicative f) => AsBearing p f Double | A prism on bearing to a double between 0 inclusive and 360 exclusive.
all (\m -> _Bearing # m == n) ((n :: Double) ^? _Bearing) |
| AsBearing p f Bearing | |
| ((~) (* -> * -> *) p (->), Functor f) => AsBearing p f VincentyDirectResult |
modBearing :: Double -> Bearing Source
Construct a bearing such that if the given value is out of bounds, a modulus is taken to keep it within 0 inclusive and 360 exclusive.
>>>modBearing 7Bearing 7.0000
>>>modBearing 0Bearing 0.0000
>>>modBearing (-0.0001)Bearing 359.9999
>>>modBearing 360Bearing 0.0000
>>>modBearing 359.99999Bearing 360.0000
>>>modBearing 359.999Bearing 359.9990