| Safe Haskell | None |
|---|
Data.Geo.Geodetic.Azimuth
Description
An azimuth in degrees between 0 and 360.
Documentation
modAzimuth :: Double -> AzimuthSource
Construct an azimuth such that if the given value is out of bounds, a modulus is taken to keep it within 0 inclusive and 360 exclusive.
>>>modAzimuth 7Azimuth 7.0000
>>>modAzimuth 0Azimuth 0.0000
>>>modAzimuth 360Azimuth 0.0000
>>>modAzimuth 361Azimuth 1.0000
>>>modAzimuth 359.999Azimuth 359.9990
nAzimuth :: Prism' Double AzimuthSource
A prism on azimuth to an integer between 0 and 359 inclusive.
>>>7 ^? nAzimuthJust (Azimuth 7.0000)
>>>0 ^? nAzimuthJust (Azimuth 0.0000)
>>>359.999 ^? nAzimuthJust (Azimuth 359.9990)
>>>360 ^? nAzimuthNothing
all (\m -> nAzimuth # m == n) (n ^? nAzimuth)