| Copyright | (C) Frank Staals |
|---|---|
| License | see the LICENSE file |
| Maintainer | Frank Staals |
| Safe Haskell | None |
| Language | GHC2024 |
HGeometry.Polygon.Instances
Contents
Description
Arbitrary instances for the polygon types in hgeometry
Synopsis
- allSimplePolygons :: [SimplePolygon (Point 2 Double)]
- shrinkPolygon :: (Ord r, Fractional r, Real r) => SimplePolygon (Point 2 r) -> [SimplePolygon (Point 2 r)]
Documentation
allSimplePolygons :: [SimplePolygon (Point 2 Double)] Source #
shrinkPolygon :: (Ord r, Fractional r, Real r) => SimplePolygon (Point 2 r) -> [SimplePolygon (Point 2 r)] Source #
Shrink a simple polygon.
The main idea is to try and remove every vertex (making sure that we still get a valid polygon). At the end, we try to simplify the coordinates of the points involved as well.
Orphan instances
| Arbitrary (SimplePolygon (Point 2 Rational)) Source # | |
| Arbitrary (SimplePolygon (Point 2 (IntervalReal (RealNumber p)))) Source # | |
Methods arbitrary :: Gen (SimplePolygon (Point 2 (IntervalReal (RealNumber p)))) Source # shrink :: SimplePolygon (Point 2 (IntervalReal (RealNumber p))) -> [SimplePolygon (Point 2 (IntervalReal (RealNumber p)))] Source # | |
| Arbitrary (SimplePolygon (Point 2 (RealNumber p))) Source # | |
Methods arbitrary :: Gen (SimplePolygon (Point 2 (RealNumber p))) Source # shrink :: SimplePolygon (Point 2 (RealNumber p)) -> [SimplePolygon (Point 2 (RealNumber p))] Source # | |
| Arbitrary (SimplePolygon (Point 2 Double)) Source # | |