diff options
Diffstat (limited to 'examples/03-struct-generic/src/point.hob')
| -rw-r--r-- | examples/03-struct-generic/src/point.hob | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/03-struct-generic/src/point.hob b/examples/03-struct-generic/src/point.hob index ec6d76e..5beed86 100644 --- a/examples/03-struct-generic/src/point.hob +++ b/examples/03-struct-generic/src/point.hob @@ -1,3 +1,9 @@ +/// A set of drawings. +struct OwnedLineDrawing[TPoint] { + field drawing: LineDrawing[TPoint]; + field owner: String; +} + /// A 2D drawing made up of straight lines. struct LineDrawing2D { field lines: List[Line[Point2D]]; @@ -8,6 +14,12 @@ struct LineDrawing[TPoint] { field lines: List[Line[TPoint]]; } +/// A cubic Bezier curve. +struct BezierCurve[TPoint] { + field start: Line[TPoint]; + field end: Line[TPoint]; +} + /// A straight line from one point to another. struct Line[TPoint] { field start: TPoint; |
