mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
Further details on classes like epsilon compare, further unit tests.
This commit is contained in:
@@ -203,6 +203,18 @@ public:
|
||||
return this->m_matrix.isIdentity();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Is identity matrix? Epsilon considered.
|
||||
* \return
|
||||
*/
|
||||
bool isIdentityEpsilon() const
|
||||
{
|
||||
ImplMatrix m(0.0);
|
||||
m += (*this);
|
||||
m.round();
|
||||
return m.isIdentity();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set as identity matrix
|
||||
* \return
|
||||
@@ -228,6 +240,18 @@ public:
|
||||
*/
|
||||
bool isZero() const;
|
||||
|
||||
/*!
|
||||
* \brief Is identity matrix? Epsilon considered.
|
||||
* \return
|
||||
*/
|
||||
bool isZeroEpsilon() const
|
||||
{
|
||||
ImplMatrix m(0.0);
|
||||
m += (*this);
|
||||
m.round();
|
||||
return m.isZero();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All values equal, if so matirx is not invertible
|
||||
* \return
|
||||
@@ -240,6 +264,11 @@ public:
|
||||
*/
|
||||
void fill(double value) { this->m_matrix.fill(value); }
|
||||
|
||||
/*!
|
||||
* \brief Round all values
|
||||
*/
|
||||
void round();
|
||||
|
||||
/*!
|
||||
* \brief Get element
|
||||
* \param row
|
||||
|
||||
Reference in New Issue
Block a user