From ca9bbea0a0a3ec98fa6774a9d2c75f01974b0a68 Mon Sep 17 00:00:00 2001 From: xAlpharax <42233094+xAlpharax@users.noreply.github.com> Date: Mon, 4 Sep 2023 02:57:57 +0300 Subject: Final form. Changes to be committed: new file: Inconsolata-Regular.ttf modified: LorenzAttractor.cpp modified: LorenzAttractor.h modified: vectormath.h modified: README.md modified: main.cpp modified: run.sh --- vectormath.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'vectormath.h') diff --git a/vectormath.h b/vectormath.h index 874502f..7aaf917 100644 --- a/vectormath.h +++ b/vectormath.h @@ -1,8 +1,7 @@ -#pragma once #include +#include #include #include -#include #include ///////////////////// @@ -115,7 +114,9 @@ public: delete[] m_data; } }; + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + template std::ostream& operator<<(std::ostream &out, Matrix3 &m) { @@ -128,7 +129,9 @@ std::ostream& operator<<(std::ostream &out, Matrix3 &m) return out; } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + template bool operator==(Matrix3 m1, Matrix3 m2) { @@ -154,7 +157,9 @@ bool operator!=(Matrix3 m1, Matrix3 m2) return false; else return true; } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + template Matrix3 operator+(const Matrix3 &left, const Matrix3 &right) { @@ -172,7 +177,9 @@ Matrix3& operator+=(Matrix3 &left, const Matrix3 &right) return left; } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + template Matrix3 operator-(const Matrix3 &left, const Matrix3 &right) { @@ -200,7 +207,9 @@ Matrix3& operator-(Matrix3 &left) return left; } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + template Matrix3& operator*=(Matrix3 &left, const U &right) { @@ -245,6 +254,7 @@ Matrix3 operator*(Matrix3 &left, Matrix3 &right) } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + template Matrix3& operator/=(Matrix3 &left, U right) { @@ -261,6 +271,7 @@ Matrix3 operator/(Matrix3 left, U right) {left[1][0] / right, left[1][1] / right, left[1][2] / right}, {left[2][0] / right, left[2][1] / right, left[2][2] / right} }; } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// -- cgit v1.2.3