Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Graphics.Implicit.MathUtil
Synopsis
- rmax :: ℝ -> ℝ -> ℝ -> ℝ
- rmaximum :: ℝ -> [ℝ] -> ℝ
- rminimum :: ℝ -> [ℝ] -> ℝ
- distFromLineSeg :: ℝ2 -> (ℝ2, ℝ2) -> ℝ
- pack :: Box2 -> ℝ -> [(Box2, a)] -> ([(ℝ2, a)], [(Box2, a)])
- box3sWithin :: ℝ -> (ℝ3, ℝ3) -> (ℝ3, ℝ3) -> Bool
- reflect :: (Num (f a), Fractional a, Metric f) => f a -> f a -> f a
- alaV3 :: (V3 a -> V3 a) -> (a, a, a) -> (a, a, a)
- packV3 :: (a, a, a) -> V3 a
- unpackV3 :: V3 a -> (a, a, a)
- infty :: Fractional t => t
Documentation
Arguments
:: ℝ | radius |
-> ℝ | first number to round maximum |
-> ℝ | second number to round maximum |
-> ℝ | resulting number |
Rounded Maximum Consider max(x,y) = 0, the generated curve has a square-like corner. We replace it with a quarter of a circle
NOTE: rmax is not associative!
Like rmax, but on a list instead of two. Just as maximum is. The implementation is to take the maximum two and rmax those.
Like rmin but on a list.
Arguments
:: Box2 | The box to pack within |
-> ℝ | The space seperation between items |
-> [(Box2, a)] | Objects with their boxes |
-> ([(ℝ2, a)], [(Box2, a)]) | Packed objects with their positions, objects that could be packed |
Pack the given objects in a box the given size.
Arguments
:: (Num (f a), Fractional a, Metric f) | |
=> f a | Mirror axis |
-> f a | Vector to transform |
-> f a |
Reflect a vector across a hyperplane defined by its normal vector.
infty :: Fractional t => t Source #
Haskell's standard library doesn't make floating-point infinity available in any convenient way, so we define it here.