選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

123456789101112
  1. const bound = (position, min, max) => {
  2. let ret = position
  3. if (min !== undefined) {
  4. ret = Math.max(position, min)
  5. }
  6. if (max !== undefined) {
  7. ret = Math.min(ret, max)
  8. }
  9. return ret
  10. }
  11. export default bound