初始化
This commit is contained in:
16
vendor/h264-live-player/utils/Size.ts
vendored
Normal file
16
vendor/h264-live-player/utils/Size.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Represents a 2-dimensional size value.
|
||||
*/
|
||||
|
||||
export default class Size {
|
||||
constructor(public w: number, public h: number) {}
|
||||
toString() {
|
||||
return '(' + this.w + ', ' + this.h + ')';
|
||||
}
|
||||
getHalfSize() {
|
||||
return new Size(this.w >>> 1, this.h >>> 1);
|
||||
}
|
||||
length() {
|
||||
return this.w * this.h;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user