0
How to generate random numbers btwn -1 and 1 in js ?
I'm trying to generate random number between -1 and 1.
3 ответов
+ 2
// integer
n = (Math.floor(Math.random() * 3)) - 1;
// float
n = (Math.random() * 2) - 1;
+ 2
Johann Ditrich plz explain
by the way thanx
+ 1
Donna thanx