From 79135b272877b2f5c8451787f083f914a25c1107 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 21 Jun 2015 20:38:17 +0200 Subject: Fixed refinement --- src/Trivmix/Types.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Trivmix') diff --git a/src/Trivmix/Types.hs b/src/Trivmix/Types.hs index 01418bf..9822449 100644 --- a/src/Trivmix/Types.hs +++ b/src/Trivmix/Types.hs @@ -91,9 +91,9 @@ class Adjustable a where -- sub = (-) instance Adjustable Level where - add (DB x) (DB y) = DB $ ((+) `on` linToDb) x y + add (DB x) (DB y) = DB $ dBToLin $ ((+) `on` linToDb) x y add x y = x + y - sub (DB x) (DB y) = DB $ ((-) `on` linToDb) x y + sub (DB x) (DB y) = DB $ dBToLin $ ((-) `on` linToDb) x y sub x y = x - y doAdjustment :: Adjustable a => a -> Adjustment a -> a -- cgit v1.2.3