Iosevka/packages/geometry/src/anchor.mjs
2024-03-04 01:30:14 -08:00

12 lines
231 B
JavaScript

export class Anchor {
constructor(x, y) {
this.x = x;
this.y = y;
}
transform(tfm) {
return Anchor.transform(tfm, this);
}
static transform(tfm, a) {
return new Anchor(tfm.applyX(a.x, a.y), tfm.applyY(a.x, a.y));
}
}