summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-08-13 16:37:07 +0200
committerDavid Roundy <droundy@darcs.net>2007-08-13 16:37:07 +0200
commita55b243dc40ebcf1f7245a3900607054a8f8ede1 (patch)
treef696366ee4e2b908f49b1212883a119169a9519b
parentfab070111489e8e239354b3faf708d320a75e971 (diff)
downloadmetatile-a55b243dc40ebcf1f7245a3900607054a8f8ede1.tar
metatile-a55b243dc40ebcf1f7245a3900607054a8f8ede1.zip
make splitHorizontallyBy accept any RealFrac.
darcs-hash:20070813143707-72aca-93f6dd8047146f84e4a66a6860bb931b66507e53
-rw-r--r--Operations.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs
index ca91dcb..f4a9d88 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -431,7 +431,7 @@ splitVertically n (Rectangle sx sy sw sh) = Rectangle sx sy sw smallh :
splitHorizontally n = map mirrorRect . splitVertically n . mirrorRect
-- Divide the screen into two rectangles, using a rational to specify the ratio
-splitHorizontallyBy, splitVerticallyBy :: Rational -> Rectangle -> (Rectangle, Rectangle)
+splitHorizontallyBy, splitVerticallyBy :: RealFrac r => r -> Rectangle -> (Rectangle, Rectangle)
splitHorizontallyBy f (Rectangle sx sy sw sh) =
( Rectangle sx sy leftw sh
, Rectangle (sx + fromIntegral leftw) sy (sw-fromIntegral leftw) sh)