From 922f93eb2aa9d8ef1747289f5973de25bd346edc Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 25 Oct 2011 17:26:14 -0400 Subject: [PATCH] Inline the dot product (Ben Lippmeier). --- src/Point.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Point.hs b/src/Point.hs index 49ad534..685bc7a 100644 --- a/src/Point.hs +++ b/src/Point.hs @@ -27,6 +27,7 @@ scale (x, y, z) d = (x*d, y*d, z*d) -- | Returns the dot product of two points (taken as three-vectors). +{-# INLINE dot #-} dot :: Point -> Point -> Double dot (x1, y1, z1) (x2, y2, z2) = (x2 - x1)^(2::Int) + (y2 - y1)^(2::Int) + (z2 - z1)^(2::Int) -- 2.43.2