Skip to content

Commit

Permalink
Merge pull request phuocng#490 from 1milligram/links
Browse files Browse the repository at this point in the history
feat: Link clamp and wrap numbers snippets
  • Loading branch information
phuocng authored Dec 18, 2021
2 parents 70978cd + a820076 commit cf6f64b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snippets/number/clamp-a-number-between-two-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ const clamp = (val: number, min: number = 0, max: number = 1): number => Math.ma
```js
clamp(199, 10, 25); // 25
```

**See also**

- [Wrap a number between two values](/number/wrap-a-number-between-two-values)
4 changes: 4 additions & 0 deletions snippets/number/wrap-a-number-between-two-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ wrap(24, 10, 25); // 24
wrap(25, 10, 25); // 25
wrap(26, 10, 25); // 10
```

**See also**

- [Clamp a number between two values](/number/clamp-a-number-between-two-values)

0 comments on commit cf6f64b

Please sign in to comment.