Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- newtype Ring a = Ring (Vector (V2 a))
- ringSize :: Ring a -> Int
- ringAccess :: Ring a -> Int -> V2 a
- ringClamp :: Ring a -> Int -> Int
- ringUnpack :: Ring a -> Vector (V2 a)
- ringPack :: Vector (V2 a) -> Ring a
- ringMap :: (V2 a -> V2 b) -> Ring a -> Ring b
- ringRayIntersect :: Ring Rational -> (Int, Int) -> (Int, Int) -> Maybe (V2 Rational)
- area :: Fractional a => V2 a -> V2 a -> V2 a -> a
- area2X :: Fractional a => V2 a -> V2 a -> V2 a -> a
- epsilon :: Fractional a => a
- epsEq :: (Ord a, Fractional a) => a -> a -> Bool
- isLeftTurn :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool
- isLeftTurnOrLinear :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool
- isRightTurn :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool
- isRightTurnOrLinear :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool
- direction :: Fractional a => V2 a -> V2 a -> V2 a -> a
- isInside :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> V2 a -> Bool
- barycentricCoords :: Fractional a => V2 a -> V2 a -> V2 a -> V2 a -> (a, a, a)
- rayIntersect :: (Fractional a, Ord a) => (V2 a, V2 a) -> (V2 a, V2 a) -> Maybe (V2 a)
- isBetween :: (Ord a, Fractional a) => V2 a -> (V2 a, V2 a) -> Bool
- lineIntersect :: (Ord a, Fractional a) => (V2 a, V2 a) -> (V2 a, V2 a) -> Maybe (V2 a)
- distSquared :: Fractional a => V2 a -> V2 a -> a
- approxDist :: (Real a, Fractional a) => V2 a -> V2 a -> a
- distance' :: (Real a, Fractional a) => V2 a -> V2 a -> Double
- triangleAngles :: V2 Double -> V2 Double -> V2 Double -> (Double, Double, Double)

# Ring

# Math

epsilon :: Fractional a => a Source #

isLeftTurn :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool Source #

isLeftTurnOrLinear :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool Source #

isRightTurn :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool Source #

isRightTurnOrLinear :: (Fractional a, Ord a) => V2 a -> V2 a -> V2 a -> Bool Source #

barycentricCoords :: Fractional a => V2 a -> V2 a -> V2 a -> V2 a -> (a, a, a) Source #

distSquared :: Fractional a => V2 a -> V2 a -> a Source #

approxDist :: (Real a, Fractional a) => V2 a -> V2 a -> a Source #