A more complicated structure test.

This commit is contained in:
2024-04-11 09:22:28 -07:00
parent 85407c8f48
commit a3ce53bca2

View File

@@ -0,0 +1,27 @@
struct Point {
x: u64;
y: u64;
}
struct Line {
start: Point;
end: Point;
}
function slope(l) -> u64
(l.end.y - l.start.y) / (l.end.x - l.start.x);
test = Line {
start: Point {
x: 1;
y: 2;
};
end: Point {
x: 2;
y: 4;
};
};
foo = slope(test);
print foo;