| Safe Haskell | None |
|---|
Geometry
Contents
Description
2D geometry primitives — a small module used to show off the Kedgeree Haddock theme.
It exercises the things a theme has to get right: section headings,
data declarations with record fields, type classes with methods and
instances, operators, and inline code / code blocks.
let unit = Circle origin 1 area unit -- ≈ 3.14159
Bold like this, emphasis like this, and a link to Shape.
Points
A point in the plane.
translate :: Point -> Point -> PointSource #
Move a point by a delta given as another point.
Since: kedgeree-demo-0.1.0
Shapes
A geometric shape.
Constructors
| Circle Point Double | a circle given its centre and radius |
| Rectangle Point Point | an axis-aligned rectangle given two opposite corners |
rectangle :: Double -> Double -> ShapeSource #
Smart constructor for a rectangle from its width and height,
anchored at the origin.