52 :
Mat3(static_cast<T>(0), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0),
53 static_cast<T>(0), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0))
73 for (
int i = 0; i < 3; ++i)
74 for (
int j = 0; j < 3; ++j) res[i] += m_data[j * 3 + i] * vec[j];
94 return m_data[i_row * 3 + i_col];
100 return m_data[i_row * 3 + i_col];
103 template <
typename T>
106 for (
int i = 0; i <
SIZE; ++i) m_data[i] = mat[i];
109 template <
typename T>
113 for (
int i = 0; i <
SIZE; ++i) res[i] = m_data[i] - mat[i];
118 template <
typename T>
122 for (
int i = 0; i <
SIZE; ++i) res[i] = m_data[i] * var;
127 template <
typename T>
const Mat3< T > operator-(const Mat3< T > &mat) const
const T operator()(const int i_row, const int i_col) const
const Mat3< T > operator*(const T var) const
bool operator==(const Mat3< T > &mat) const
static constexpr int SIZE
static bool is_equal(double a, double b)
const T operator[](const int idx) const
const Vec3< T > dot(const Vec3< T > vec) const
void operator=(const Mat3< T > &mat)