UNPKG

@mikezimm/npmfunctions

Version:
32 lines (31 loc) 1.84 kB
/** * This was created to pass in screen ratios like 3440 / 1440 and get rounded value for comparison. * You have to adjust the decimals depending on if it's landscape or portrait to be able to do a comparison. * That way you can group screen sizes in buckets like 16 x 9 when the actual ratio is fractionally different * @param num */ export declare function roundRatio(num: number): number; export declare function round5decimals(num: number): number; export declare function round4decimals(num: number): number; export declare function round3decimals(num: number): number; export declare function round2decimals(num: number): number; export declare function round1decimals(num: number): number; /*** * d888b d88888b d888888b .d8888. d888888b d88888D d88888b db .d8b. d8888b. d88888b db * 88' Y8b 88' `~~88~~' 88' YP `88' YP d8' 88' 88 d8' `8b 88 `8D 88' 88 * 88 88ooooo 88 `8bo. 88 d8' 88ooooo 88 88ooo88 88oooY' 88ooooo 88 * 88 ooo 88~~~~~ 88 `Y8b. 88 d8' 88~~~~~ 88 88~~~88 88~~~b. 88~~~~~ 88 * 88. ~8~ 88. 88 db 8D .88. d8' db 88. 88booo. 88 88 88 8D 88. 88booo. * Y888P Y88888P YP `8888Y' Y888888P d88888P Y88888P Y88888P YP YP Y8888P' Y88888P Y88888P * * import { getSizeLabel } from '@mikezimm/npmfunctions/dist/Services/Strings/stringServices'; */ export declare function getSizeLabel(size: number, decimal?: number): string; export declare function getCountLabel(count: number, decimal?: number): string; /** * Returns string with 1000's separated format. * For US: 1,000,000 * For EU: 1.000.000 * @param numb */ export declare function getCommaSepLabel(numb: number): string;