摘要: 在边界值 x 和 y 指定的包含范围内限制 num。 如果 num 超出了范围,则返回 num。 否则,返回范围内最近的数字。 let clampNumber = (num,x,y) => Math.max(Math.min(num,Math.max(x,y)),Math.min(x,y)) 分析步 阅读全文
posted @ 2020-11-18 17:18 671_MrSix 阅读(133) 评论(0) 推荐(0) 编辑