#include <ginger/matrix2.hpp>
template<typename T1, typename T2 = T1>
Matrix2 class
| Template parameters | |
|---|---|
| T1 | |
| T2 | |
Constructors, destructors, conversion operators
Public functions
Arithmetic operators
definie +, -, *, /, +=, -=, *=, /=, etc.
- auto operator-() const -> Matrix2< T1, T2 > -> auto constexpr
- Negate.
-
template<typename U1, typename U2>auto operator+=(const Matrix2<U1, U2>& other) -> Matrix2< T1, T2 > & -> CONSTEXPR14 auto
- Add.
-
template<typename U1, typename U2>auto operator-=(const Matrix2<U1, U2>& other) -> Matrix2< T1, T2 > & -> CONSTEXPR14 auto
- Substract.
-
template<typename R>auto operator*=(const R& alpha) -> Matrix2< T1, T2 > & -> CONSTEXPR14 auto
- Multiply.
-
template<typename R>auto operator/=(const R& alpha) -> Matrix2< T1, T2 > & -> CONSTEXPR14 auto
- Divide.
-
template<typename U1, typename U2>auto mdot(const Vector2<U1, U2>& other) const -> T1 -> auto constexpr
- Multiply with Vector2.
- auto det() const -> double -> auto constexpr
- Det.
-
template<typename U1, typename U2>auto operator+(Matrix2<T1, T2> x, const Matrix2<U1, U2>& y) -> Matrix2< T1, T2 > -> auto constexpr
- Add.
-
template<typename U1, typename U2>auto operator-(Matrix2<T1, T2> x, const Matrix2<U1, U2>& y) -> Matrix2< T1, T2 > -> auto constexpr
- Substract.
-
template<typename R>auto operator*(Matrix2<T1, T2> x, const R& alpha) -> Matrix2< T1, T2 > -> auto constexpr
- Multiply by a scalar.
-
template<typename R>auto operator*(const R& alpha, Matrix2<T1, T2> x) -> Matrix2< T1, T2 > -> auto constexpr
- Multiply (by a scalar)
-
template<typename R>auto operator/(Matrix2<T1, T2> x, const R& alpha) -> Matrix2< T1, T2 > -> auto constexpr
- Divide (by a scalar)
Function documentation
template<typename T1, typename T2>
auto ginger:: Matrix2<T1, T2>:: x() const -> const T1 & constexpr
| Returns | constexpr const T1& |
|---|
template<typename T1, typename T2>
auto ginger:: Matrix2<T1, T2>:: y() const -> const T2 & constexpr
| Returns | constexpr const T2& |
|---|
template<typename T1, typename T2>
auto ginger:: Matrix2<T1, T2>:: operator-() const -> Matrix2< T1, T2 > constexpr
Negate.
| Returns | Matrix2<T1, T2> |
|---|
template<typename T1, typename T2>
template<typename U1, typename U2>
CONSTEXPR14 auto ginger:: Matrix2<T1, T2>:: operator+=(const Matrix2<U1, U2>& other) -> Matrix2< T1, T2 > &
Add.
| Template parameters | |
|---|---|
| U1 | |
| U2 | |
| Parameters | |
| other in | |
| Returns | Matrix2<T1, T2>& |
template<typename T1, typename T2>
template<typename U1, typename U2>
CONSTEXPR14 auto ginger:: Matrix2<T1, T2>:: operator-=(const Matrix2<U1, U2>& other) -> Matrix2< T1, T2 > &
Substract.
| Template parameters | |
|---|---|
| U1 | |
| U2 | |
| Parameters | |
| other in | |
| Returns | Matrix2<T1, T2>& |
template<typename T1, typename T2>
template<typename R>
CONSTEXPR14 auto ginger:: Matrix2<T1, T2>:: operator*=(const R& alpha) -> Matrix2< T1, T2 > &
Multiply.
| Template parameters | |
|---|---|
| R | |
| Parameters | |
| alpha in | |
| Returns | Matrix2<T1, T2>& |
template<typename T1, typename T2>
template<typename R>
CONSTEXPR14 auto ginger:: Matrix2<T1, T2>:: operator/=(const R& alpha) -> Matrix2< T1, T2 > &
Divide.
| Template parameters | |
|---|---|
| R | |
| Parameters | |
| alpha in | |
| Returns | Matrix2<T1, T2>& |
template<typename T1, typename T2>
auto ginger:: Matrix2<T1, T2>:: det() const -> double constexpr
Det.
| Returns | double |
|---|