зеркало из https://github.com/mozilla/gecko-dev.git
Bug 705200 - Add mozilla::gfx::Matrix::IsIdentity(). r=Bas
This commit is contained in:
Родитель
6012344c54
Коммит
8d91c03a0b
|
@ -156,6 +156,16 @@ public:
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns true if the matrix is an identity matrix.
|
||||||
|
*/
|
||||||
|
bool IsIdentity() const
|
||||||
|
{
|
||||||
|
return _11 == 1.0f && _12 == 0.0f &&
|
||||||
|
_21 == 0.0f && _22 == 1.0f &&
|
||||||
|
_31 == 0.0f && _32 == 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool FuzzyEqual(Float aV1, Float aV2) {
|
static bool FuzzyEqual(Float aV1, Float aV2) {
|
||||||
// XXX - Check if fabs does the smart thing and just negates the sign bit.
|
// XXX - Check if fabs does the smart thing and just negates the sign bit.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче