|
| constexpr | Matrix2 () noexcept |
| |
| constexpr | Matrix2 (const Vector2< T > &x, const Vector2< T > &y) |
| | initializes matrix from its 2 rows
|
| |
| template<typename U > |
| constexpr | Matrix2 (const Matrix2< U > &m) |
| |
| constexpr const Vector2< T > & | operator[] (int row) const noexcept |
| | row access
|
| |
| constexpr Vector2< T > & | operator[] (int row) noexcept |
| |
| constexpr Vector2< T > | col (int i) const noexcept |
| | column access
|
| |
| constexpr T | trace () const noexcept |
| | computes trace of the matrix
|
| |
| constexpr T | normSq () const noexcept |
| | compute sum of squared matrix elements
|
| |
| constexpr auto | norm () const noexcept |
| |
| constexpr T | det () const noexcept |
| | computes determinant of the matrix
|
| |
| constexpr Matrix2< T > inverse() const noexcept MR_REQUIRES_IF_SUPPORTED(std constexpr Matrix2< T > | transposed () const noexcept |
| | computes inverse matrix
|
| |
|
| constexpr bool | operator== (const Matrix2< T > &a, const Matrix2< T > &b) |
| |
| constexpr bool | operator!= (const Matrix2< T > &a, const Matrix2< T > &b) |
| |
| constexpr auto | operator+ (const Matrix2< T > &a, const Matrix2< T > &b) -> Matrix2< decltype(std::declval< T >()+std::declval< T >())> |
| | NOTE: We use std::declval() in the operators below because libclang 18 in our binding generator is bugged and chokes on decltyping a.x and such. TODO fix this when we update libclang.
|
| |
| constexpr auto | operator- (const Matrix2< T > &a, const Matrix2< T > &b) -> Matrix2< decltype(std::declval< T >() - std::declval< T >())> |
| |
| constexpr auto | operator* (T a, const Matrix2< T > &b) -> Matrix2< decltype(std::declval< T >() *std::declval< T >())> |
| |
| constexpr auto | operator* (const Matrix2< T > &b, T a) -> Matrix2< decltype(std::declval< T >() *std::declval< T >())> |
| |
| constexpr auto | operator/ (Matrix2< T > b, T a) -> Matrix2< decltype(std::declval< T >()/std::declval< T >())> |
| |
| constexpr Matrix2< T > & | operator+= (Matrix2< T > &a, const Matrix2< T > &b) |
| |
| constexpr Matrix2< T > & | operator-= (Matrix2< T > &a, const Matrix2< T > &b) |
| |
| constexpr Matrix2< T > & | operator*= (Matrix2< T > &a, T b) |
| |
| constexpr Matrix2< T > & | operator/= (Matrix2< T > &a, T b) |
| |
| constexpr auto | operator* (const Matrix2< T > &a, const Vector2< T > &b) -> Vector2< decltype(dot(std::declval< Vector2< T > >(), std::declval< Vector2< T > >()))> |
| | x = a * b
|
| |
| constexpr auto | operator* (const Matrix2< T > &a, const Matrix2< T > &b) -> Matrix2< decltype(dot(std::declval< Vector2< T > >(), std::declval< Vector2< T > >()))> |
| | product of two matrices
|
| |
| std::ostream & | operator<< (std::ostream &s, const Matrix2 &mat) |
| |
| std::istream & | operator>> (std::istream &s, Matrix2 &mat) |
| |
template<typename T>
struct MR::Matrix2< T >
arbitrary 2x2 matrix