More outline cleanup changes (#1562)

This commit is contained in:
be5invis 2023-02-25 07:27:21 -08:00
parent 880ff0deee
commit c5d322709a
4 changed files with 126 additions and 28 deletions

View file

@ -1,3 +1,5 @@
import { mix } from "../utils.mjs";
export class Point {
constructor(type, x, y) {
this.type = type;
@ -57,6 +59,9 @@ export class Point {
static translated(z, dx, dy) {
return new Point(z.type, z.x + dx || 0, z.y + dy || 0);
}
static mix(type, a, b, p) {
return new Point(type, mix(a.x, b.x, p), mix(a.y, b.y, p));
}
}
Point.Type = {
Corner: 0,