Copyright | Alexander Ignatyev 2016 |
---|---|

Safe Haskell | Safe |

Language | Haskell2010 |

Utility functions.

- fromFixed :: (Fractional a, HasResolution b) => Fixed b -> a
- trunc :: RealFrac a => a -> a
- fraction :: (RealFrac a, Num b) => a -> (b, a)
- reduceToZeroRange :: RealFrac a => a -> a -> a
- toRadians :: Floating a => a -> a
- fromRadians :: Floating a => a -> a
- roundToN :: RealFrac a => Int -> a -> a
- tropicalYearLen :: Double

# Documentation

fromFixed :: (Fractional a, HasResolution b) => Fixed b -> a Source #

Convert From Fixed to Fractional

trunc :: RealFrac a => a -> a Source #

return the integral part of a number almost the same as truncate but result type is Real

fraction :: (RealFrac a, Num b) => a -> (b, a) Source #

Almost the same the properFraction function but result type

reduceToZeroRange :: RealFrac a => a -> a -> a Source #

Reduce to range from 0 to n

fromRadians :: Floating a => a -> a Source #

Convert from radians to degrees

tropicalYearLen :: Double Source #

Length of a tropical year in days