Random Function Question.
As I was going through my Java book it brought me upon java.util.Random. Though it only allows me to generate positive numbers. Is there a way to generate negative numbers?
I was trying to accomplish a range of -1 to 1, which isn't a huge range and I could achieve the results by other means of assigning variables based off of the number it generated from the range of myVariable.nextInt(3) though that would be horribly inefficient. Especially if my range was larger than just 3. Is there a way to accomplish this?