Organize support files and simplify imports
This commit is contained in:
parent
70f41352c1
commit
ef203af85a
178 changed files with 61 additions and 269 deletions
|
@ -1,16 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = class Anchor {
|
||||
constructor(x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
transform(tfm) {
|
||||
return Anchor.transform(tfm, this);
|
||||
}
|
||||
static transform(tfm, a) {
|
||||
const x = a.x * tfm.xx + a.y * tfm.yx + tfm.x;
|
||||
const y = a.x * tfm.xy + a.y * tfm.yy + tfm.y;
|
||||
return new Anchor(x, y);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue