Reputation: 95
Can you use
irandom(-10,10)
to generate negative numbers? Or does this function provides only number >=0? There is no information in documentation of GML.
Upvotes: 0
Views: 1300
Reputation: 1777
A few examples:
a = -1 * irandom(10);
a = -irandom(10);
a = irandom(20) - 10;
a = irandom_range(-10, 10);
Upvotes: 2