Refactor out cursives to a separate file (#2437)

This commit is contained in:
Belleve 2024-07-27 19:40:18 -10:00 committed by GitHub
parent 1146e47850
commit 61ad3c365c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 118 additions and 97 deletions

View file

@ -27,6 +27,22 @@ export class Box {
withYPadding(d) {
return new Box(this.top - d, this.bottom + d, this.left, this.right);
}
withXMix(pL, pR) {
return new Box(
this.top,
this.bottom,
mix(this.left, this.right, pL),
mix(this.left, this.right, pR),
);
}
withYMix(pT, pB) {
return new Box(
mix(this.bottom, this.top, pT),
mix(this.bottom, this.top, pB),
this.left,
this.right,
);
}
mixX(t) {
return mix(this.left, this.right, t);
}