You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
774 B
24 lines
774 B
/**
|
|
* 保留x位小数
|
|
*/
|
|
export declare function toPrecision(num: number, precision: number): number;
|
|
/**
|
|
* 千分位
|
|
* 100000 -> 10,000
|
|
*/
|
|
export declare function toThousands(num: number): string;
|
|
/**
|
|
* 获得数字科学计数
|
|
* 1000000 = 1e6
|
|
*/
|
|
export declare function toScientificNotation(num: number): string;
|
|
/**
|
|
* 用k的方式表达
|
|
* 1234 -> 1K
|
|
* 12345 -> 12K
|
|
*/
|
|
export declare function toKNotation(num: number, precision?: number): string;
|
|
export declare const ifNegative: <T extends keyof any>(x: any, a: T, b?: T) => T | undefined;
|
|
export declare const ifPositive: <T extends keyof any>(x: any, a: T, b?: T) => T | undefined;
|
|
export declare const multi: (a: number, b: number) => number;
|
|
export declare const mid: (a: number, b?: number) => number;
|
|
|