Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- dualLine :: Num r => Point 2 r -> Line 2 r
- dualPoint :: (Fractional r, Eq r) => Line 2 r -> Maybe (Point 2 r)
- dualPoint' :: (Fractional r, Eq r) => Line 2 r -> Point 2 r
Standard Point-Line duality in R^2
dualLine :: Num r => Point 2 r -> Line 2 r Source #
Maps a line point (px,py) to a line (y=px*x - py)
dualPoint :: (Fractional r, Eq r) => Line 2 r -> Maybe (Point 2 r) Source #
Returns Nothing if the input line is vertical Maps a line l: y = ax + b to a point (a,-b)
dualPoint' :: (Fractional r, Eq r) => Line 2 r -> Point 2 r Source #
Pre: the input line is not vertical