Guest User

Untitled

a guest
Jul 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. // округление до произвольного модуля
  2. function roundMod(n,m) {
  3. return Math.round(n/m)*m;
  4. }
  5.  
  6. // получение целого случайного числа в заданном диапазоне
  7. function randomDiap(n,m) {
  8. return Math.floor(Math.random()*(m-n+1))+n;
  9. }
Add Comment
Please, Sign In to add comment