18 lines
339 B
TypeScript
18 lines
339 B
TypeScript
|
/**
|
||
|
* 浮点数相等判断误差值
|
||
|
*/
|
||
|
export declare const epsilon = 0.00001;
|
||
|
/**
|
||
|
* 判断浮点数是不是0
|
||
|
* @param v
|
||
|
* @returns
|
||
|
*/
|
||
|
export declare function isZero(v: number): boolean;
|
||
|
/**
|
||
|
* 两浮点数是否相等
|
||
|
* @param f1
|
||
|
* @param f2
|
||
|
* @returns
|
||
|
*/
|
||
|
export declare function floatEquals(f1: number, f2: number): boolean;
|