From ce418f33f2a537bd9dd10a4e3e303500cc2477e7 Mon Sep 17 00:00:00 2001 From: hasufell Date: Wed, 17 Dec 2014 05:15:03 +0100 Subject: [PATCH] TESTS: make inRangeProp5 more random --- Test/Vector.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Test/Vector.hs b/Test/Vector.hs index 1db3a26..60c989a 100644 --- a/Test/Vector.hs +++ b/Test/Vector.hs @@ -38,9 +38,9 @@ inRangeProp4 sq@((_, y1), (x2, _)) = inRange sq (p2 (x2, y1)) -inRangeProp5 :: Square -> Bool -inRangeProp5 sq@((x1, y1), (x2, y2)) = - inRange sq (p2 (x1 + ((x2 - x1) / 2), y1 + ((y2 - y1) / 2))) +inRangeProp5 :: Square -> Positive Double -> Positive Double -> Bool +inRangeProp5 sq@((x1, y1), (x2, y2)) (Positive a) (Positive b) = + inRange sq (p2 (x1 + ((x2 - x1) / (a + 1)), y1 + ((y2 - y1) / (b + 1)))) onPTProp1 :: PT -> Bool