This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| functions:randsign [2017/07/09 14:42] – created korshun | functions:randsign [2017/07/09 14:43] (current) – korshun | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ===== Description ===== | ===== Description ===== | ||
| - | Returns a random sign ('' | + | Returns a random sign ('' |
| ===== Examples ===== | ===== Examples ===== | ||
| < | < | ||
| int speed = randsign() * 10.0; | int speed = randsign() * 10.0; | ||
| + | // speed is now either 10.0 or -10.0. | ||
| </ | </ | ||