Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Eq Seconds Source | |
Ord Seconds Source | |
Show Seconds Source | A show instance that prints to 4 decimal places. This is to take floating-point rounding errors into account. |
AsSeconds p f Seconds Source | |
(Choice p, Applicative f) => AsCoordinate p f (Double, (DegreesLongitude, Minutes, Seconds)) Source | |
(Choice p, Applicative f) => AsCoordinate p f ((DegreesLatitude, Minutes, Seconds), Double) Source | |
(Profunctor p, Functor f) => AsCoordinate p f ((DegreesLongitude, Minutes, Seconds), (DegreesLatitude, Minutes, Seconds)) Source | |
(Profunctor p, Functor f) => AsCoordinate p f ((DegreesLatitude, Minutes, Seconds), (DegreesLongitude, Minutes, Seconds)) Source | |
(Profunctor p, Functor f) => AsCoordinate p f ((DegreesLongitude, Minutes, Seconds), Latitude) Source | |
(Profunctor p, Functor f) => AsCoordinate p f (Latitude, (DegreesLongitude, Minutes, Seconds)) Source | |
(Profunctor p, Functor f) => AsCoordinate p f (Longitude, (DegreesLatitude, Minutes, Seconds)) Source | |
(Profunctor p, Functor f) => AsCoordinate p f ((DegreesLatitude, Minutes, Seconds), Longitude) Source | |
(Profunctor p, Functor f) => AsLongitude p f (DegreesLongitude, Minutes, Seconds) Source | An isomorphism on the triple of degrees longitude, minutes, seconds to a longitude.
|
(Profunctor p, Functor f) => AsLatitude p f (DegreesLatitude, Minutes, Seconds) Source | An isomorphism on the triple of degrees latitude, minutes, seconds to a latitude.
|
class AsSeconds p f s where Source
Nothing
(Choice p, Applicative f) => AsSeconds p f Double Source | A prism on seconds to a double between 0 inclusive and 60 exclusive.
all (\m -> _Seconds # m == (n :: Double)) (n ^? _Seconds) |
AsSeconds p f Seconds Source | |
((~) (* -> * -> *) p (->), Functor f) => AsSeconds p f Longitude Source | |
((~) (* -> * -> *) p (->), Functor f) => AsSeconds p f Latitude Source | |
((~) (* -> * -> *) p (->), Applicative f) => AsSeconds p f Coordinate Source |
modSeconds :: Double -> Seconds Source
Setting a value within the range 0
and 60
using modulo arithmetic.
>>>
modSeconds 7
Seconds 7.0000
>>>
modSeconds 0
Seconds 0.0000
>>>
modSeconds (-0.0001)
Seconds 59.9999
>>>
modSeconds 60
Seconds 0.0000
>>>
modSeconds 59.99999
Seconds 60.0000
>>>
modSeconds 59.999
Seconds 59.9990
>>>
modSeconds 61
Seconds 1.0000
>>>
modSeconds (-1)
Seconds 59.0000