diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-07 11:28:52 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-07 11:30:17 +0100 |
| commit | 5a0053c7291549bc0be3753a09d6dc0efb364da6 (patch) | |
| tree | 02e304d1fe7f5816e1f911262e850b19e9e60253 /tests/typ/math | |
| parent | b2572f9d48a8f0efd30014302dcc271cd89fa91e (diff) | |
Vectors and cases
Diffstat (limited to 'tests/typ/math')
| -rw-r--r-- | tests/typ/math/matrix.typ | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/typ/math/matrix.typ b/tests/typ/math/matrix.typ new file mode 100644 index 00000000..ec84778c --- /dev/null +++ b/tests/typ/math/matrix.typ @@ -0,0 +1,20 @@ +// Test vectors, matrices, and cases. + +--- +$ v = vec(1, 2+3, 4) $ + +--- +#set vec(delim: "|") +$ vec(1, 2) $ + +--- +// Error: 17-20 expected "(", "[", "{", or "|" +#set vec(delim: "%") + +--- +$ f(x, y) := cases( + 1 "if" (x dot y)/2 <= 0, + 2 "if" x in NN, + 3 "if" x "is even", + 4 "else", +) $ |
