1.新增es.TimeUtils

2.优化并给部分类添加注释
3.移除fasterDictionary
This commit is contained in:
yhh
2023-03-13 23:32:24 +08:00
parent 323fb6a5fe
commit caa3ffc8f5
14 changed files with 2240 additions and 1796 deletions

View File

@@ -1,14 +1,28 @@
module es {
/**
* 位操作类,用于操作一个位数组。
*/
export class Bits {
private _bit: {[index: number]: number} = {};
private _bit: { [index: number]: number } = {};
/**
* 设置指定位置的位值。
* @param index 位置索引
* @param value 位值0 或 1
*/
public set(index: number, value: number) {
this._bit[index] = value;
}
/**
* 获取指定位置的位值。
* @param index 位置索引
* @returns 位值0 或 1
*/
public get(index: number): number {
let v = this._bit[index];
return v == null ? 0 : v;
}
}
}