Cleanup of geometry code

This commit is contained in:
be5invis 2023-03-28 01:32:45 -07:00
parent a096544d2f
commit 2d84803cec
8 changed files with 127 additions and 103 deletions

View file

@ -1,5 +1,16 @@
import { mix } from "../utils.mjs";
export class Vec2 {
constructor(x, y) {
this.x = x;
this.y = y;
}
static from(z) {
return new Vec2(z.x, z.y);
}
}
export class Point {
constructor(type, x, y) {
this.type = type;