Cleanup of geometry code
This commit is contained in:
parent
a096544d2f
commit
2d84803cec
8 changed files with 127 additions and 103 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue