From eb1ef122149718d509fb94f4fb356513cb751455 Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Sat, 26 Oct 2024 23:52:11 +0200 Subject: [PATCH] doc: Add LaTeX images to Mat3 --- .github/workflows/gh-pages.yml | 2 +- .gitlab-ci.yml | 2 +- src/jngl/Mat3.hpp | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 419883eee..4eec102d2 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -8,7 +8,7 @@ jobs: image: registry.fedoraproject.org/fedora-minimal:40 steps: - name: Install dependencies - run: microdnf install -y git graphviz doxygen cmake make tar xz rsync + run: microdnf install -y git graphviz doxygen cmake make tar xz rsync texlive-latex texlive-newunicodechar texlive-dvips pdf2svg - uses: actions/checkout@v4 with: persist-credentials: false diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 962924017..0416039e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -86,7 +86,7 @@ pages: dependencies: - web script: - - microdnf install -y doxygen cmake make tar xz git >/dev/null + - microdnf install -y doxygen cmake make tar xz git texlive-latex texlive-newunicodechar texlive-dvips pdf2svg >/dev/null - cd doc - cmake . - make diff --git a/src/jngl/Mat3.hpp b/src/jngl/Mat3.hpp index ef229ffca..934ac6416 100644 --- a/src/jngl/Mat3.hpp +++ b/src/jngl/Mat3.hpp @@ -18,9 +18,22 @@ class Vec2; class Mat3 { public: /// creates identity matrix + /// + /// \f[ + /// \left( \begin{array}{rrr} + /// 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 + /// \end{array}\right) + /// \f] Mat3() = default; - /// construct matrix from row-major array with 9 elements + /// construct matrix from **row**-major array with 9 elements + /// + /// `jngl::Mat3({ 1, 2, 3, 4, 5, 6, 7, 8, 9 })` is equivalent to: + /// \f[ + /// \left( \begin{array}{rrr} + /// 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 + /// \end{array}\right) + /// \f] Mat3(std::initializer_list); /// Multiplies the matrix with a translation matrix generated from v