13 lines
291 B
TypeScript
13 lines
291 B
TypeScript
|
|
class Rectangle {
|
||
|
|
public x: number;
|
||
|
|
public y: number;
|
||
|
|
public width: number;
|
||
|
|
public height: number;
|
||
|
|
|
||
|
|
constructor(x: number, y: number, width: number, height: number){
|
||
|
|
this.x = x;
|
||
|
|
this.y = y;
|
||
|
|
this.width = width;
|
||
|
|
this.height = height;
|
||
|
|
}
|
||
|
|
}
|