tweak
This commit is contained in:
parent
0a295fad34
commit
12cdc96216
1 changed files with 1 additions and 2 deletions
|
@ -54,9 +54,8 @@ roughSize short i
|
||||||
at n = 1000^n
|
at n = 1000^n
|
||||||
|
|
||||||
chop :: Integer -> Integer
|
chop :: Integer -> Integer
|
||||||
chop d = round ((fromInteger i :: Double) / fromInteger (at d))
|
chop d = round $ (fromInteger i :: Double) / fromInteger (at d)
|
||||||
|
|
||||||
units :: Integer -> String -> String -> String
|
|
||||||
units d u u' = let num = chop d in
|
units d u u' = let num = chop d in
|
||||||
show num ++ " " ++
|
show num ++ " " ++
|
||||||
(if short then u' else plural num u)
|
(if short then u' else plural num u)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue