summaryrefslogtreecommitdiffhomepage
path: root/Monitors
diff options
context:
space:
mode:
Diffstat (limited to 'Monitors')
-rw-r--r--Monitors/Common.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Monitors/Common.hs b/Monitors/Common.hs
index 9706eac..390f383 100644
--- a/Monitors/Common.hs
+++ b/Monitors/Common.hs
@@ -288,7 +288,8 @@ type Pos = (Int, Int)
takeDigits :: Int -> Float -> Float
takeDigits d n =
- read $ showFFloat (Just d) n ""
+ fromIntegral ((round (n * fact)) :: Int) / fact
+ where fact = 10 ^ d
floatToPercent :: Float -> String
floatToPercent n =