DistanceUnits-0.1.0.1: A comprehensive distance library

Safe HaskellNone

DistanceUnits

Synopsis

Documentation

class Distance d whereSource

A generic class that defines all the units of measure in running. The base unit of meters was chosen because Metric is orders more sane than the English system

Methods

toMeters :: d -> MeterSource

Converts the given unit of distance into meters

fromMeters :: Meter -> dSource

Converts the given number of meters into the unit of measure

toFloat :: d -> FloatSource

Yields the given distance as a float

data AU Source

Astronomical, ascending

addDist :: (Distance a, Distance b, Distance c) => a -> b -> cSource

Functions

Add two distances together to get a common distance

subDist :: (Distance a, Distance b, Distance c) => a -> b -> cSource

Find the difference between two distcances

convertDist :: (Distance a, Distance b) => a -> bSource

Convert one distance to another.