Replace FOV algorithm and add faux-3D
This commit is contained in:
@ -70,6 +70,17 @@ export class Point {
|
||||
equals(other: Point): boolean {
|
||||
return this.x == other.x && this.y == other.y;
|
||||
}
|
||||
|
||||
scale(other: Point | Size) {
|
||||
if (other instanceof Point) {
|
||||
return new Point(this.x * other.x, this.y * other.y);
|
||||
}
|
||||
return new Point(this.x * other.w, this.y * other.h);
|
||||
}
|
||||
|
||||
subtract(top: Point): Size {
|
||||
return new Size(this.x - top.x, this.y - top.y);
|
||||
}
|
||||
}
|
||||
|
||||
export class Size {
|
||||
|
Reference in New Issue
Block a user