This commit is contained in:
Manav Rathi 2024-05-14 11:20:20 +05:30
parent f3e3fb45bb
commit 76cb218cce
No known key found for this signature in database

View file

@ -58,32 +58,12 @@ export class Box implements IRect {
this.height = height;
}
public get left(): number {
return this.x;
}
public get top(): number {
return this.y;
}
public get right(): number {
return this.x + this.width;
}
public get bottom(): number {
return this.y + this.height;
}
public get area(): number {
return this.width * this.height;
}
public get topLeft(): Point {
return new Point(this.left, this.top);
}
public get topRight(): Point {
return new Point(this.right, this.top);
}
public get bottomLeft(): Point {
return new Point(this.left, this.bottom);
return new Point(this.x, this.y);
}
public get bottomRight(): Point {
return new Point(this.right, this.bottom);
return new Point(this.x + this.width, this.y + this.height);
}
public round(): Box {