From 67ef9fa2235b93f976d5ee714c25841458506d8b Mon Sep 17 00:00:00 2001 From: hasufell Date: Mon, 13 Oct 2014 19:15:09 +0200 Subject: [PATCH] VEC: fix "defaulting... constraint to type Integer" warning --- Algebra/Vector.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Algebra/Vector.hs b/Algebra/Vector.hs index 0aea12b..67d911b 100644 --- a/Algebra/Vector.hs +++ b/Algebra/Vector.hs @@ -27,7 +27,7 @@ getAngle a b = -- |Get the length of a vector. vecLength :: Vec -> Double -vecLength v = sqrt (x^2 + y^2) +vecLength v = sqrt (x^(2 :: Int) + y^(2 :: Int)) where (x, y) = unr2 v