Refactor
This commit is contained in:
parent
f054546aa6
commit
48a55a4a97
51 changed files with 604 additions and 577 deletions
|
|
@ -1,17 +0,0 @@
|
|||
export class Vec2 {
|
||||
public static readonly Zero = new Vec2(0, 0);
|
||||
|
||||
public constructor(public readonly x: number, public readonly y: number) {}
|
||||
|
||||
public add(other: Vec2): Vec2 {
|
||||
return new Vec2(this.x + other.x, this.y + other.y);
|
||||
}
|
||||
|
||||
public subtract(other: Vec2): Vec2 {
|
||||
return new Vec2(this.x - other.x, this.y - other.y);
|
||||
}
|
||||
|
||||
public multiply(other: Vec2): Vec2 {
|
||||
return new Vec2(this.x * other.x, this.y * other.y);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue