Safe Haskell | None |
---|---|
Language | Haskell98 |
Convert a physical value to a human readable string.
Synopsis
- mulPrec :: Int
- showNat :: (Ord i, Show v, C a, Ord a, C a v) => T i a -> T i v -> String
- showSplit :: (Ord i, Show v, C a, Ord a, C a v) => T i a -> T i v -> (v, String)
- showScaled :: (Ord i, Show v, Ord a, C a, C a v) => v -> [UnitSet i a] -> (v, String)
- chooseScale :: (Ord i, Show v, Ord a, C a, C a v) => v -> UnitSet i a -> (v, Scale a)
- showUnitPart :: Bool -> Bool -> Scale a -> String
- defScale :: UnitSet i v -> Scale v
- findCloseScale :: (Ord a, C a) => a -> [Scale a] -> Scale a
- totalDefScale :: C a => T i a -> a
- getUnit :: C a => String -> T i a -> T i a
Documentation
showNat :: (Ord i, Show v, C a, Ord a, C a v) => T i a -> T i v -> String Source #
Show the physical quantity in a human readable form with respect to a given unit data base.
showSplit :: (Ord i, Show v, C a, Ord a, C a v) => T i a -> T i v -> (v, String) Source #
Returns the rescaled value as number and the unit as string. The value can be used re-scale connected values and display them under the label of the unit
chooseScale :: (Ord i, Show v, Ord a, C a, C a v) => v -> UnitSet i a -> (v, Scale a) Source #
Choose a scale where the number becomes handy and return the scaled number and the corresponding scale.
totalDefScale :: C a => T i a -> a Source #
unused