Optimize
This commit is contained in:
parent
79cffe6a18
commit
be43dc99eb
7 changed files with 102 additions and 33 deletions
|
@ -58,4 +58,7 @@ module.exports = class Transform {
|
|||
static isTranslate(tfm) {
|
||||
return tfm.xx === 1 && tfm.yy === 1 && tfm.xy === 0 && tfm.yx === 0;
|
||||
}
|
||||
static isIdentity(tfm) {
|
||||
return this.isTranslate(tfm) && tfm.x === 0 && tfm.y === 0;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue