bouncing-crusher
Safe HaskellNone
LanguageHaskell2010

MathUtils

Synopsis

Documentation

distanceBetween #

Arguments

:: Point

Point 1

-> Point

Point 2

-> Float

Distance

Get distance between two points

vectorSum :: [Vector] -> Vector #

Get sum of vector list

vectorDiff :: Vector -> Vector -> Vector #

Get vector difference

segmentCircleFirstIntersection #

Arguments

:: Coords

Segment start

-> Coords

Segment end

-> (Coords, Float)

Circle center and radius

-> Maybe Coords

Maybe intersection closest to segment start

Get the first intersection of segment with circle

minimumByTotal :: (a -> a -> Ordering) -> [a] -> Maybe a #

Total version of minimumBy function

maximumByTotal :: (a -> a -> Ordering) -> [a] -> Maybe a #

Total version of maximumBy function