[improvement] adjust utils

This commit is contained in:
陈嘉涵
2019-06-06 11:49:39 +08:00
parent f5059ea6ba
commit d7a5be67fe
37 changed files with 96 additions and 82 deletions

View File

@@ -0,0 +1,3 @@
export function range(num: number, min: number, max: number): number {
return Math.min(Math.max(num, min), max);
}