From a55b243dc40ebcf1f7245a3900607054a8f8ede1 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Mon, 13 Aug 2007 16:37:07 +0200 Subject: make splitHorizontallyBy accept any RealFrac. darcs-hash:20070813143707-72aca-93f6dd8047146f84e4a66a6860bb931b66507e53 --- Operations.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Operations.hs') 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) -- cgit v1.2.3