* feat(Poll): add option to randomize poll choices * improve --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com> Co-authored-by: k00b <k00b@stacker.news>
8 lines
180 B
JavaScript
8 lines
180 B
JavaScript
export function randInRange (min, max) {
|
|
return Math.random() * (max - min) + min
|
|
}
|
|
|
|
export function shuffleArray (array) {
|
|
return [...array].sort(() => Math.random() - 0.5)
|
|
}
|