Geometry
Description
data V2 Source #
Constructors
Defined in Geometry
Methods
(==) :: V2 -> V2 -> Bool #
(/=) :: V2 -> V2 -> Bool #
(+) :: V2 -> V2 -> V2 #
(-) :: V2 -> V2 -> V2 #
(*) :: V2 -> V2 -> V2 #
negate :: V2 -> V2 #
abs :: V2 -> V2 #
signum :: V2 -> V2 #
fromInteger :: Integer -> V2 #
compare :: V2 -> V2 -> Ordering #
(<) :: V2 -> V2 -> Bool #
(<=) :: V2 -> V2 -> Bool #
(>) :: V2 -> V2 -> Bool #
(>=) :: V2 -> V2 -> Bool #
max :: V2 -> V2 -> V2 #
min :: V2 -> V2 -> V2 #
showsPrec :: Int -> V2 -> ShowS #
show :: V2 -> String #
showList :: [V2] -> ShowS #
rnf :: V2 -> () #
mag2 :: V2 -> Int Source #
The square of the magnitude of the vector.
dist2 :: V2 -> V2 -> Int Source #
The square of the distance between two vectors.
dot :: V2 -> V2 -> Int Source #
Dot product of two vectors.
cross :: V2 -> V2 -> Int Source #
Cross product of two vectors.
turn :: V2 -> V2 -> V2 -> Ordering Source #
The turn going from p1 to p2 to p3. Returns an Ordering representing left, no turn, or right. Mnemonic: LT stands for "left turn".