Format snippets
This commit is contained in:
@@ -9,7 +9,8 @@ Clamps `num` within the inclusive range specified by the boundary values `a` and
|
||||
- Otherwise, return the nearest number in the range.
|
||||
|
||||
```js
|
||||
const clampNumber = (num, a, b) => Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));
|
||||
const clampNumber = (num, a, b) =>
|
||||
Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user