double random1 = Math.random() * 9 + -9;
double random2 = Math.random() * -9 + 9;
I need randomly generated numbers ranging from -9 to 9 using Math.random. When I use this code I have here it only prints the first number as a negative number.I've ran this multiple times and still the first number is always negative while the second is positive. How can I fix this to be more random? Thanks