Implement poking using Verx lists

This commit is contained in:
jgk
2021-07-30 20:04:55 +02:00
parent 834464db51
commit d7649b951b
12 changed files with 109 additions and 155 deletions
+6 -6
View File
@@ -22,12 +22,12 @@ V2 x1 y1 +.+ V2 x2 y2 =
{- | 2D coordinate-wise subtraction. -}
(-.-) :: Point2 -> Point2 -> Point2
{-# INLINE (-.-) #-}
(-.-) = (-)
--(x1, y1) -.- (x2, y2) =
-- let
-- !x = x1 - x2
-- !y = y1 - y2
-- in (x, y)
--(-.-) = (-)
V2 x1 y1 -.- V2 x2 y2 =
let
!x = x1 - x2
!y = y1 - y2
in V2 x y
{- | 2D scalar multiplication. -}
(*.*) :: Float -> Point2 -> Point2
{-# INLINE (*.*) #-}