This commit is contained in:
2025-03-21 17:48:08 +08:00
parent 9cd93e60df
commit 7a4578c16d
10 changed files with 299 additions and 87 deletions

View File

@@ -4,6 +4,6 @@
* @param [x=16] 推荐使用偶数
* @returns 最近的 x 的倍数
*/
export function nearestMultiple(n: number, x: number = 16): number {
export function nearestMultiple(n: number, x: number = 32): number {
return Math.floor((n + x/2) / x) * x;
}