class Vector extends p5.Vector { x: number y: number constructor(x: number, y: number){ super(x, y); } addMag(length: number): Vector{ this.setMag(this.mag() + length) return this } serialized(): Serialized.Vector{ return { x: this.x, y: this.y }; } copy(): Vector{ return new Vector(this.x, this.y) } }