geom2d-0.1.2.0: Geom2d/Shape.hs
module Geom2d.Shape
( Shape
, Spatial (..)
, circle
, rectangle
)
where
import Geom2d.Point
import Geom2d.Rotation
import Geom2d.Shape.Internal
import Geom2d.Translate
circle :: Num a => p a -> a -> Shape p a
circle m r = ShapeCircle $ mkCircleInt m r
rectangle :: (Translate p, Eq a, RealFloat a, Point p, Rotation p) =>
p a -> a -> a -> Maybe (Shape p a)
rectangle m a b = ShapePolygon <$> rectangleInt m a b