summaryrefslogtreecommitdiff
path: root/examples/03-struct-generic/src/point.hob
blob: 3ed314ad4c304a6ab6894d8b39e24d441319c200 (plain)
1
2
3
4
5
6
7
8
9
10
11
/// A straight line from one point to another.
struct Line[TPoint] {
    field start: TPoint;
    field end: TPoint;
}

/// A 2D point.
struct Point {
    field x: Int32;
    field y: Int32;
}