新增hash

This commit is contained in:
yhh
2020-12-28 16:59:16 +08:00
parent ebc1ab649e
commit f934890fac
11 changed files with 122 additions and 38 deletions

View File

@@ -945,6 +945,7 @@ declare module es {
* 存储这个允许我们始终能够安全地从物理系统中移除对撞机,即使它在试图移除它之前已经被移动了。
*/
registeredPhysicsBounds: Rectangle;
protected _colliderRequiresAutoSizing: boolean;
_localOffsetLength: number;
_isPositionDirty: boolean;
_isRotationDirty: boolean;
@@ -1768,6 +1769,18 @@ declare module es {
* @param length
*/
static incrementWithWrap(t: number, length: number): number;
/**
* 以roundToNearest为步长将值舍入到最接近的数字。例如在125中找到127到最近的5个结果
* @param value
* @param roundToNearest
*/
static roundToNearest(value: number, roundToNearest: number): number;
/**
* 检查传递的值是否在某个阈值之下。对于小规模、精确的比较很有用
* @param value
* @param ep
*/
static withinEpsilon(value: number, ep?: number): boolean;
/**
* 由上移量向上移。start可以小于或大于end。例如:开始是2结束是10移位是4结果是6
* @param start
@@ -3066,6 +3079,15 @@ declare module es {
update(): void;
}
}
declare module es {
class Hash {
/**
* 从一个字节数组中计算一个哈希值
* @param data
*/
static computeHash(...data: number[]): number;
}
}
declare module es {
interface IComparer<T> {
compare(x: T, y: T): number;
@@ -3976,12 +3998,6 @@ declare module es {
static round(vec: Vector2): Vector2;
}
}
declare class WebGLUtils {
/**
* 获取webgl context
*/
static getContext(): CanvasRenderingContext2D;
}
declare module linq {
class Enumerable {
/**