int randsign()
Returns a random sign (-1 or 1). Shorthand for 2 * Random(0, 1) - 1.
-1
1
2 * Random(0, 1) - 1
int speed = randsign() * 10.0; // speed is now either 10.0 or -10.0.